Make settings regex non greedy.
I'm surprised this didn't cause an issue before but as far as I can figure this should always be non-greedy. I think it worked before because the items we were looking for was previously the last item in the list but that is no longer the case in python 3 because of dictionary order changes.
This commit is contained in:
@@ -281,7 +281,7 @@ class Env(object):
|
||||
"""
|
||||
django_setting_value = cls.get_django_setting(django_setting, system, settings)
|
||||
pattern = re.compile(
|
||||
u"[\"']{setting}[\"']: [\"'](?P<setting_value>.*)[\"']".format(setting=nested_django_setting)
|
||||
u"[\"']{setting}[\"']: [\"'](?P<setting_value>.*?)[\"']".format(setting=nested_django_setting)
|
||||
)
|
||||
match = pattern.search(django_setting_value)
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user