From f59b41379a95528f91b14dfd31e36468b4721c7d Mon Sep 17 00:00:00 2001 From: zPlus Date: Wed, 27 Jul 2022 11:48:16 +0200 Subject: [PATCH] Add integer code to exit() call. Add an integer (4) to the exit() call, such that gunicorn will quit instead of restarting the app continuously. --- web.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web.py b/web.py index 38edbcf..879b5c9 100644 --- a/web.py +++ b/web.py @@ -15,7 +15,6 @@ import pytz import re import stat import subprocess -import sys import timeago from pygments import highlight @@ -88,7 +87,7 @@ def list_repositories(): if not os.path.isdir(GITOLITE_REPOSITORIES_ROOT): print('Invalid repositories path: {}'.format(GITOLITE_REPOSITORIES_ROOT)) - sys.exit() + exit(4) # This only exists for exporting the bottle app object for a WSGI server such as Gunicorn application = bottle.app()