changeset 8091:726c64c1cb04 stable

hooks: slight improvement of get_hook_environment
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 29 Dec 2019 01:41:47 +0100
parents c8af6594ded9
children bbbfee57fb96
files kallithea/lib/utils2.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils2.py	Sun Dec 29 15:15:09 2019 +0100
+++ b/kallithea/lib/utils2.py	Sun Dec 29 01:41:47 2019 +0100
@@ -536,12 +536,13 @@
     """
 
     try:
-        extras = json.loads(os.environ['KALLITHEA_EXTRAS'])
+        kallithea_extras = os.environ['KALLITHEA_EXTRAS']
     except KeyError:
         raise HookEnvironmentError("Environment variable KALLITHEA_EXTRAS not found")
 
+    extras = json.loads(kallithea_extras)
     try:
-        for k in ['username', 'repository', 'scm', 'action', 'ip']:
+        for k in ['username', 'repository', 'scm', 'action', 'ip', 'config']:
             extras[k]
     except KeyError:
         raise HookEnvironmentError('Missing key %s in KALLITHEA_EXTRAS %s' % (k, extras))