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.
|
# or repo, so I think this isn't a weak link.
|
||||||
with open('.git/HEAD', encoding='utf_8') as head_f:
|
with open('.git/HEAD', encoding='utf_8') as head_f:
|
||||||
head_txt = head_f.read()
|
head_txt = head_f.read()
|
||||||
head_path = git_regex.match(head_txt).group(1)
|
|
||||||
try:
|
try:
|
||||||
|
head_path = git_regex.match(head_txt).group(1)
|
||||||
with open('.git/' + head_path, encoding='utf_8') as ref_f:
|
with open('.git/' + head_path, encoding='utf_8') as ref_f:
|
||||||
gitref = ref_f.read()[:7]
|
gitref = ref_f.read()[:7]
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue