From 9defb275d350f27955f3a4784be8f29680f323f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Fri, 6 Sep 2019 00:23:52 +0200 Subject: [PATCH] fix logging if GIT_DIR is none --- gitosis/run_hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py index 02fc055..903d40a 100644 --- a/gitosis/run_hook.py +++ b/gitosis/run_hook.py @@ -66,10 +66,11 @@ class Main(app.App): os.umask(0022) git_dir = os.environ.get('GIT_DIR') - log.debug("GIT_DIR", git_dir) if git_dir is None: log.error('Must have GIT_DIR set in enviroment') sys.exit(1) + else: + log.debug("GIT_DIR", git_dir) if hook == 'post-update': log.info('Running hook %s', hook)