projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6ccd0d
)
Use subprocess.Popen, hoping for Windows portability
author
David Neto
<dneto@google.com>
Tue, 23 Feb 2016 22:58:31 +0000
(17:58 -0500)
committer
David Neto
<dneto@google.com>
Tue, 23 Feb 2016 23:09:50 +0000
(18:09 -0500)
Replaces use of subprocess.check_output
utils/update_build_version.py
patch
|
blob
|
history
diff --git
a/utils/update_build_version.py
b/utils/update_build_version.py
index
0a62488
..
13efc26
100755
(executable)
--- a/
utils/update_build_version.py
+++ b/
utils/update_build_version.py
@@
-34,8
+34,10
@@
def describe(dir):
"""Runs 'git describe' in dir. If successful, returns the output; otherwise,
returns 'unknown hash, <date>'."""
try:
- return subprocess.check_output(["git", "describe"], cwd=dir).rstrip()
- except subprocess.CalledProcessError:
+ p = subprocess.Popen(["git", "describe"], stdout=subprocess.PIPE, cwd=dir)
+ (stdout, _) = p.communicate()
+ return stdout.rstrip()
+ except:
return 'unknown hash, ' + datetime.date.today().isoformat()
def main():