list.copy() is not compatible with python 2.7

I doubt that a .copy() is required there since list() would already create one but since the previous committer added it I am improving by replacing the .copy() with a [:] which makes a copy in python 2.7 and 3+
This commit is contained in:
Marc Vieira-Cardinal (VA2MVC) 2018-01-28 18:46:33 -05:00 committed by rallytime
parent e64764499a
commit 65fa24aa26
No known key found for this signature in database
GPG Key ID: E8F1A4B90D0DEA19

View File

@ -240,7 +240,7 @@ class CloudClient(object):
if a.get('provider', '')]
if providers:
_providers = opts.get('providers', {})
for provider in list(_providers).copy():
for provider in list(_providers)[:]:
if provider not in providers:
_providers.pop(provider)
return opts