From 4fc5d692bfd07d53b37aed6160cb1110612c32b7 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 6 Jun 2022 08:37:08 -0400 Subject: [PATCH] exclude git hash if unavailable --- relay/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay/views.py b/relay/views.py index 0ba2f99..6eac9d7 100644 --- a/relay/views.py +++ b/relay/views.py @@ -12,9 +12,10 @@ from .processors import run_processor try: commit_label = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode('ascii') + version = f'{__version__} {commit_label}' except: - commit_label = '???' + version = __version__ async def home(request): @@ -169,7 +170,7 @@ async def nodeinfo_2_0(request): }, 'software': { 'name': 'activityrelay', - 'version': f'{__version__} {commit_label}' + 'version': version }, 'usage': { 'localPosts': 0,