0

Try to prevent findGitHash from ever returning None

See #1093
This commit is contained in:
Andrew Chin
2014-06-01 21:13:55 -04:00
parent a7aab9d1b2
commit 381d66f36d

View File

@@ -43,12 +43,12 @@ def findGitHash():
line = p.stdout.readlines()[0].strip() line = p.stdout.readlines()[0].strip()
if line and len(line) == 40 and all(c in hexdigits for c in line): if line and len(line) == 40 and all(c in hexdigits for c in line):
return line return line
return "unknown"
except Exception: except Exception:
try: try:
import overviewer_version import overviewer_version
return overviewer_version.HASH return overviewer_version.HASH
except Exception: except Exception:
pass
return "unknown" return "unknown"
def findGitVersion(): def findGitVersion():