From 5bfdcad0f5ab9b65ae225a55575194c9448655b0 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 22 Oct 2019 10:12:35 -0400 Subject: [PATCH] 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. --- pavelib/utils/envs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index b97f0cd63b..dcff051155 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -281,7 +281,7 @@ class Env(object): """ django_setting_value = cls.get_django_setting(django_setting, system, settings) pattern = re.compile( - u"[\"']{setting}[\"']: [\"'](?P.*)[\"']".format(setting=nested_django_setting) + u"[\"']{setting}[\"']: [\"'](?P.*?)[\"']".format(setting=nested_django_setting) ) match = pattern.search(django_setting_value) if match: