forked from MarseyWorld/MarseyWorld
hanlde git_head error
parent
d4922b0e4c
commit
0453367f47
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue