Skip to content
Snippets Groups Projects
Commit 5bfdcad0 authored by Feanil Patel's avatar Feanil Patel
Browse files

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.
parent 7dbee1c3
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment