Mercurial > kallithea
changeset 5078:aa81f44c3207
utils: cleanup of function for extracting hook values from KALLITHEA_EXTRAS
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 28 Apr 2015 16:55:05 +0200 |
parents | faf943716616 |
children | fc71103e16b7 |
files | kallithea/lib/utils2.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/utils2.py Tue Apr 28 16:55:05 2015 +0200 +++ b/kallithea/lib/utils2.py Tue Apr 28 16:55:05 2015 +0200 @@ -625,25 +625,25 @@ def _extract_extras(env=None): """ - Extracts the rc extras data from os.environ, and wraps it into named + Extracts the Kallithea extras data from os.environ, and wraps it into named AttributeDict object """ if not env: env = os.environ try: - rc_extras = json.loads(env['KALLITHEA_EXTRAS']) + extras = json.loads(env['KALLITHEA_EXTRAS']) except KeyError: - rc_extras = {} + extras = {} try: for k in ['username', 'repository', 'locked_by', 'scm', 'make_lock', 'action', 'ip']: - rc_extras[k] + extras[k] except KeyError, e: - raise Exception('Missing key %s in os.environ %s' % (e, rc_extras)) + raise Exception('Missing key %s in os.environ %s' % (e, extras)) - return AttributeDict(rc_extras) + return AttributeDict(extras) def _set_extras(extras):