Skip to content

Commit

Permalink
display the exception and add the else part
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Oct 15, 2024
1 parent 97f70f2 commit 68e4b8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,15 @@ def cpu_name():
gitRefereneFiles = conf.get("referenceFilesURL")
try:
gitRefereneFilesURL = check_output_log(["git", "config", "get", "remote.origin.url"], cwd=gitRefereneFiles).decode("utf-8")
except:
except subprocess.CalledProcessError as e:
print(str(e))
gitRefereneFilesURL = gitRefereneFiles
gitReferenceFilesVersion = check_output_log(["git", "log", '--pretty=<br><table><tr><th>Commit</th><th>Date</th><th>Author</th><th>Summary</th></tr><tr><td><a href="%s/%%h">%%h</a></td><td>%%ai</td><td>%%an</td><td>%%s</td></tr></table>' % (gitRefereneFilesURL), "-1"], cwd=gitRefereneFiles).decode("utf-8")
except subprocess.CalledProcessError as e:
print(str(e))
gitReferenceFilesVersion = ""
else:
gitReferenceFilesVersion = ""

replacements = (
(u"#sysInfo#", html.escape(sysInfo)),
Expand Down

0 comments on commit 68e4b8c

Please sign in to comment.