From add2e1b79ca3702b20a180bcd448468a2abd738e Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 6 Jul 2018 11:41:35 +0800 Subject: [PATCH] Merge variable name to detail --- python/setup.py.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/setup.py.in b/python/setup.py.in index 2b052574c0..db4c7f044d 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -25,8 +25,9 @@ def _get_version_detail(idx): version_details = '@PADDLE_VERSION@'.split('.') if len(version_details) == 3: - if re.match('[0-9]+', version_details[idx]): - return int(version_details[idx]) + detail = version_details[idx] + if re.match('[0-9]+', detail): + return int(detail) return None -- GitLab