Merge pull request #1748 from vincent-lg/frozen

Fix slight bugs that prevent a frozen version
This commit is contained in:
Griatch 2018-12-02 16:05:15 +01:00 committed by GitHub
commit 941ac1db45
2 changed files with 6 additions and 3 deletions

View file

@ -105,7 +105,7 @@ def _create_version():
print(err)
try:
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
pass
return version

View file

@ -98,7 +98,10 @@ TWISTED_MIN = '18.0.0'
DJANGO_MIN = '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",
shell=True, cwd=EVENNIA_ROOT, stderr=STDOUT).strip()
version = "%s (rev %s)" % (version, rev)
except (IOError, CalledProcessError):
except (IOError, CalledProcessError, WindowsError):
# move on if git is not answering
pass
return version