From 1e7b8fadc5ec6f82512e3cb3a77e52db39016d97 Mon Sep 17 00:00:00 2001 From: Julien Constant Date: Thu, 13 Apr 2023 18:50:50 +0200 Subject: [PATCH] Should fix #607 --- core/utils.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/core/utils.py b/core/utils.py index 0e98da6b..40eeca81 100644 --- a/core/utils.py +++ b/core/utils.py @@ -35,11 +35,14 @@ def get_git_revision_short_hash() -> str: """ Return the short hash of the current commit """ - return ( - subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]) - .decode("ascii") - .strip() - ) + try: + return ( + subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]) + .decode("ascii") + .strip() + ) + except: + return "" def get_start_of_semester(d=date.today()):