Skip to content
Snippets Groups Projects
Commit 7efba995 authored by Dimitris Lampridis's avatar Dimitris Lampridis
Browse files

[tools] gen_buildinfo.py: do not fail if git log or git config fail.

parent f8681465
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,16 @@
with open("buildinfo_pkg.vhd", "w") as f:
import subprocess
import time
commitid = subprocess.check_output(
try:
commitid = subprocess.check_output(
["git", "log", "-1", "--format=%H"]).decode().strip()
userid = subprocess.check_output(
except:
commitid = "unknown"
try:
userid = subprocess.check_output(
["git", "config", "--get", "user.name"]).decode().strip()
except:
userid = "unknown"
if action == "simulation":
top = sim_top
tool = sim_tool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment