mirror of
https://github.com/ae-utbm/sith3.git
synced 2024-06-13 18:21:55 +00:00
Update utils.py
This commit is contained in:
parent
56f93e7b9e
commit
4ca08b3aa3
|
@ -36,12 +36,11 @@ def get_git_revision_short_hash() -> str:
|
|||
Return the short hash of the current commit
|
||||
"""
|
||||
try:
|
||||
return (
|
||||
subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])
|
||||
.decode("ascii")
|
||||
.strip()
|
||||
)
|
||||
except:
|
||||
output = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])
|
||||
if isinstance(output, bytes):
|
||||
return output.decode("ascii").strip()
|
||||
return output.strip()
|
||||
except subprocess.CalledProcessError:
|
||||
return ""
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user