Fix issues in quota manager editing settings module
Introduced in 'Update the QUOTA_SERVICES config to be a region mapping' was a pop while processing a setting. This meant following calls already popped the setting and incorrectly executed. This makes a local copy of the settings dict and uses that instead. Change-Id: I72d865d4456d5779c219cf3b48557dd699c45dbc
This commit is contained in:
parent
fa6256ddb3
commit
6790c51b3f
@ -137,7 +137,9 @@ class QuotaManager(object):
|
||||
self.helpers = {}
|
||||
|
||||
if settings.QUOTA_SERVICES:
|
||||
all_regions = settings.QUOTA_SERVICES.pop('*', None)
|
||||
quota_services = dict(settings.QUOTA_SERVICES)
|
||||
|
||||
all_regions = quota_services.pop('*', None)
|
||||
if all_regions:
|
||||
self.default_helpers = {}
|
||||
for service in all_regions:
|
||||
@ -145,7 +147,7 @@ class QuotaManager(object):
|
||||
self.default_helpers[service] = \
|
||||
self._quota_updaters[service]
|
||||
|
||||
for region in settings.QUOTA_SERVICES:
|
||||
for region in quota_services:
|
||||
for service in region:
|
||||
if service in self._quota_updaters:
|
||||
self.helpers[service] = self._quota_updaters[service]
|
||||
|
Loading…
x
Reference in New Issue
Block a user