Fix #1754: WindowsError is replaced with OSError

This commit is contained in:
Vincent Le Goff 2018-12-11 17:54:27 +01:00
parent 811ab0045e
commit b7893e7319
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