"dictionary changed size during iteration" issue fixed in config.py for salt-cloud

iterating over dict fixed "RuntimeError: dictionary changed size during iteration" issue
This commit is contained in:
vladislav-jomedia 2015-02-17 12:59:08 -05:00 committed by rallytime
parent 90ef4d7b0f
commit 89fd8ee6fe

View File

@ -1300,12 +1300,11 @@ def old_to_new(opts):
for provider in providers:
provider_config = {}
for opt in opts:
if not opt.startswith(provider):
continue
value = opts.pop(opt)
name = opt.split('.', 1)[1]
provider_config[name] = value
for opt, val in opts.items():
if provider in opt:
value = val
name = opt.split('.', 1)[1]
provider_config[name] = value
lprovider = provider.lower()
if provider_config: