From 0453367f47bd4fd9fe1db885e70e82a665793a44 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 1 Feb 2023 19:17:12 +0200 Subject: [PATCH] hanlde git_head error --- files/routes/jinja2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/jinja2.py b/files/routes/jinja2.py index e2e5acc77..e25902df6 100644 --- a/files/routes/jinja2.py +++ b/files/routes/jinja2.py @@ -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: