From 7d86a2cd784511c8f19d454be6708f0ea977adc4 Mon Sep 17 00:00:00 2001 From: zPlus Date: Wed, 3 Aug 2022 08:55:54 +0200 Subject: [PATCH] Fix server error when showing empty mailing list. --- web.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web.py b/web.py index 719bde6..de85fc3 100644 --- a/web.py +++ b/web.py @@ -625,8 +625,11 @@ def threads(repository): if not os.path.isdir(path): bottle.abort(404, 'No repository at this path.') - repo = pygit2.Repository(path) - tree = repo.revparse_single('HEAD').tree + try: + repo = pygit2.Repository(path) + tree = repo.revparse_single('HEAD').tree + except: + return template('mailing_list/emails.html', list_address=list_address, repository=repository) threads_list = [] tags = {}