setup.py: fix IndexError: list index out of range for empty tag list
This commit is contained in:
parent
76f4ee589d
commit
66402b280c
@ -18,7 +18,10 @@ os.system("git tag > gittags.log")
|
||||
with open ("gittags.log","r") as gt:
|
||||
taglst = gt.readlines()
|
||||
os.remove("gittags.log")
|
||||
version = taglst[-1].replace('\n','').replace('v','')
|
||||
if len(taglst) > 0 :
|
||||
version = taglst[-1].replace('\n','').replace('v','')
|
||||
else:
|
||||
version = 'unkown'
|
||||
print("building version: "+version)
|
||||
|
||||
setup(
|
||||
|
Loading…
x
Reference in New Issue
Block a user