Mercurial > kallithea
changeset 7354:51ef4b681634
hooks: drop RC_SCM_DATA for internal transfer of data to sub processes - Kallithea uses KALLITHEA_EXTRAS
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 08 Aug 2018 02:23:11 +0200 |
parents | c55338638085 |
children | efe7ed15e12c |
files | kallithea/lib/utils2.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/utils2.py Tue Aug 14 23:43:35 2018 +0200 +++ b/kallithea/lib/utils2.py Wed Aug 08 02:23:11 2018 +0200 @@ -549,21 +549,20 @@ try: extras = json.loads(env['KALLITHEA_EXTRAS']) except KeyError: - extras = {} + raise Exception("Environment variable KALLITHEA_EXTRAS not found") try: for k in ['username', 'repository', 'locked_by', 'scm', 'make_lock', 'action', 'ip']: extras[k] - except KeyError as e: - raise Exception('Missing key %s in os.environ %s' % (e, extras)) + except KeyError: + raise Exception('Missing key %s in KALLITHEA_EXTRAS %s' % (k, extras)) return AttributeDict(extras) def _set_extras(extras): - # RC_SCM_DATA can probably be removed in the future, but for compatibility now... - os.environ['KALLITHEA_EXTRAS'] = os.environ['RC_SCM_DATA'] = json.dumps(extras) + os.environ['KALLITHEA_EXTRAS'] = json.dumps(extras) def get_current_authuser():