Fix slight bugs that prevent a frozen version

This commit is contained in:
Vincent Le Goff 2018-11-21 16:11:44 +01:00
parent 5a3bd8e1d8
commit ddbd39fce5
2 changed files with 6 additions and 3 deletions

View file

@ -105,7 +105,7 @@ def _create_version():
print(err) print(err)
try: try:
version = "%s (rev %s)" % (version, check_output("git rev-parse --short HEAD", shell=True, cwd=root, stderr=STDOUT).strip()) version = "%s (rev %s)" % (version, check_output("git rev-parse --short HEAD", shell=True, cwd=root, stderr=STDOUT).strip())
except (IOError, CalledProcessError): except (IOError, CalledProcessError, WindowsError):
# ignore if we cannot get to git # ignore if we cannot get to git
pass pass
return version return version

View file

@ -98,7 +98,10 @@ TWISTED_MIN = '18.0.0'
DJANGO_MIN = '1.11' DJANGO_MIN = '1.11'
DJANGO_REC = '1.11' DJANGO_REC = '1.11'
sys.path[1] = EVENNIA_ROOT try:
sys.path[1] = EVENNIA_ROOT
except IndexError:
sys.path.append(EVENNIA_ROOT)
# ------------------------------------------------------------ # ------------------------------------------------------------
# #
@ -1214,7 +1217,7 @@ def evennia_version():
"git rev-parse --short HEAD", "git rev-parse --short HEAD",
shell=True, cwd=EVENNIA_ROOT, stderr=STDOUT).strip() shell=True, cwd=EVENNIA_ROOT, stderr=STDOUT).strip()
version = "%s (rev %s)" % (version, rev) version = "%s (rev %s)" % (version, rev)
except (IOError, CalledProcessError): except (IOError, CalledProcessError, WindowsError):
# move on if git is not answering # move on if git is not answering
pass pass
return version return version