hanlde git_head error

pull/108/head
Aevann 2023-02-01 19:17:12 +02:00
parent d4922b0e4c
commit 0453367f47
1 changed files with 1 additions and 1 deletions

View File

@ -89,8 +89,8 @@ def git_head():
# or repo, so I think this isn't a weak link.
with open('.git/HEAD', encoding='utf_8') as head_f:
head_txt = head_f.read()
head_path = git_regex.match(head_txt).group(1)
try:
head_path = git_regex.match(head_txt).group(1)
with open('.git/' + head_path, encoding='utf_8') as ref_f:
gitref = ref_f.read()[:7]
except: