Remove MAJOR, MINOR, PATCH and add comment for assert

revert-12383-port_py3_syntax
minqiyang 8 years ago
parent 037f9ae933
commit 078da5dee8

@ -18,7 +18,8 @@ def git_commit():
return git_commit
def _get_version_detail(idx):
assert idx < 3
assert idx < 3, "vesion info consists of %(major)d.%(minor)d.%(patch)d, \
so detail index must less than 3"
version_details = '@PADDLE_VERSION@'.split('.')
if len(version_details) == 3:
@ -32,21 +33,21 @@ def get_major():
if major is not None:
return major
return MAJOR
return 0
def get_minor():
minor = _get_version_detail(1)
if minor is not None:
return minor
return MINOR
return 0
def get_patch():
patch = _get_version_detail(2)
if patch is not None:
return patch
return PATCH
return 0
def is_taged():
try:

Loading…
Cancel
Save