Fix Python3 Errors in Azure Cloud Module

When using Python3, the exec_module function errors out with a
unsupported operand type(s) for +: 'dict_keys' and 'list'
error when adding the .keys() to a static list. Use the explicit
list function to make a list of keys and then add to the ['tags'] list.
This commit is contained in:
Raja 2017-06-26 11:43:28 +05:30 committed by Toshio Kuratomi
parent 9500aac5b9
commit 171d903d04
9 changed files with 9 additions and 9 deletions

View file

@ -336,7 +336,7 @@ class AzureRMNetworkInterface(AzureRMModuleBase):
def exec_module(self, **kwargs):
for key in self.module_arg_spec.keys() + ['tags']:
for key in list(self.module_arg_spec.keys()) + ['tags']:
setattr(self, key, kwargs[key])
results = dict()