# HG changeset patch # User Marcin Kuzminski # Date 2018-11-24 11:55:12 # Node ID 5cf82ecc94e9a3a0cebfb655062f6076c7e3ff00 # Parent e37f5984df473208968be1d4617c973e85f8f11c env-variables: make it safer if there's a syntax problem inside .ini file. It's better to not crash, since it means server wont start. Let users fix problems instead of breaking the startup because of that. diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -578,5 +578,8 @@ def _substitute_values(mapping, substitu raise ValueError( 'Failed to substitute env variable: {}. ' 'Make sure you have specified this env variable without ENV_ prefix'.format(e)) + except ValueError as e: + log.warning('Failed to substitute ENV variable: %s', e) + result = mapping return result