mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 03:42:35 +01:00
framework/version: Redirect git stderr output
Add an stderr argument to redirect errors ('fatal not a git repository' is the most common) to PIPE so that errors do not output to STDOUT.
This commit is contained in:
committed by
setrofim
parent
71a32dd724
commit
488bd57659
@@ -41,7 +41,7 @@ def get_wa_version_with_commit():
|
|||||||
|
|
||||||
def get_commit():
|
def get_commit():
|
||||||
p = Popen(['git', 'rev-parse', 'HEAD'],
|
p = Popen(['git', 'rev-parse', 'HEAD'],
|
||||||
cwd=os.path.dirname(__file__), stdout=PIPE)
|
cwd=os.path.dirname(__file__), stdout=PIPE, stderr=PIPE)
|
||||||
std, _ = p.communicate()
|
std, _ = p.communicate()
|
||||||
p.wait()
|
p.wait()
|
||||||
if p.returncode:
|
if p.returncode:
|
||||||
|
Reference in New Issue
Block a user