Merge pull request #1755 from vincent-lg/fix_1754

Fix #1754: WindowsError is replaced with OSError
This commit is contained in:
Griatch 2018-12-17 09:15:02 +01:00 committed by GitHub
commit 92726040e7
2 changed files with 2 additions and 2 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, WindowsError):
except (IOError, CalledProcessError, OSError):
# ignore if we cannot get to git
pass
return version

View file

@ -1217,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, WindowsError):
except (IOError, CalledProcessError, OSError):
# move on if git is not answering
pass
return version