home » zplus/clif.git
Author zPlus <zplus@peers.community> 2022-08-03 06:55:54
Committer zPlus <zplus@peers.community> 2022-08-03 06:55:54
Commit 7d86a2c (patch)
Tree caa92ff
Parent(s)

Fix server error when showing empty mailing list.


commits diff: cd58ca2..7d86a2c
1 file changed, 5 insertions, 2 deletionsdownload


Diffstat
-rw-r--r-- web.py 7

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+5/-2 M   web.py
index 719bde6..de85fc3
old size: 23K - new size: 23K
@@ -625,8 +625,11 @@ def threads(repository):
625 625 if not os.path.isdir(path):
626 626 bottle.abort(404, 'No repository at this path.')
627 627
628 - repo = pygit2.Repository(path)
629 - tree = repo.revparse_single('HEAD').tree
628 + try:
629 + repo = pygit2.Repository(path)
630 + tree = repo.revparse_single('HEAD').tree
631 + except:
632 + return template('mailing_list/emails.html', list_address=list_address, repository=repository)
630 633
631 634 threads_list = []
632 635 tags = {}