mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
fw/version: Prevent installation failure on systems without git
On systems that do not have git installed WA will currently fail to install with a FileNotFound Exception. If git is not present then we will not have a commit hash so just ignore this error.
This commit is contained in:
parent
22750b15c7
commit
e4be2b73ef
@ -48,8 +48,11 @@ def get_wa_version_with_commit():
|
||||
|
||||
|
||||
def get_commit():
|
||||
p = Popen(['git', 'rev-parse', 'HEAD'],
|
||||
cwd=os.path.dirname(__file__), stdout=PIPE, stderr=PIPE)
|
||||
try:
|
||||
p = Popen(['git', 'rev-parse', 'HEAD'],
|
||||
cwd=os.path.dirname(__file__), stdout=PIPE, stderr=PIPE)
|
||||
except FileNotFoundError:
|
||||
return None
|
||||
std, _ = p.communicate()
|
||||
p.wait()
|
||||
if p.returncode:
|
||||
|
Loading…
x
Reference in New Issue
Block a user