Unverified Commit a57f8270 authored by Lei Wang's avatar Lei Wang Committed by GitHub
Browse files

[Bugfix] Bug fix when git command is not installed (#823)

parent 15479958
...@@ -32,7 +32,8 @@ def get_git_commit_id() -> Union[str, None]: ...@@ -32,7 +32,8 @@ def get_git_commit_id() -> Union[str, None]:
cwd=os.path.dirname(os.path.abspath(__file__)), cwd=os.path.dirname(os.path.abspath(__file__)),
stderr=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
encoding='utf-8').strip() encoding='utf-8').strip()
except subprocess.SubprocessError: # FileNotFoundError is raised when git is not installed
except (subprocess.SubprocessError, FileNotFoundError):
return None return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment