1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +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:
Waleed El-Geresy 2018-06-13 13:03:31 +01:00 committed by setrofim
parent 71a32dd724
commit 488bd57659

View File

@ -41,7 +41,7 @@ def get_wa_version_with_commit():
def get_commit():
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()
p.wait()
if p.returncode: