Python: Remove deprecated uses of os.popen

T40415 by Lawrence D'Oliveiro
This commit is contained in:
Campbell Barton
2014-06-20 01:57:06 +10:00
parent eaac6cbcd9
commit 2dce13d213
5 changed files with 26 additions and 24 deletions

View File

@@ -56,7 +56,7 @@ def get_version():
raise Exception("%s: missing version string" % fname)
def get_hash():
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
build_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
if build_hash == '' or build_hash == None:
build_hash = 'UNKNOWN'