Merge "Python3: do not use '+' on dict_items objects"

This commit is contained in:
Jenkins 2015-06-19 15:47:15 +00:00 committed by Gerrit Code Review
commit ffb3658d0e
2 changed files with 3 additions and 3 deletions

View File

@ -326,8 +326,8 @@ class Securitygroup(extensions.ExtensionDescriptor):
def get_extended_resources(self, version): def get_extended_resources(self, version):
if version == "2.0": if version == "2.0":
return dict(EXTENDED_ATTRIBUTES_2_0.items() + return dict(list(EXTENDED_ATTRIBUTES_2_0.items()) +
RESOURCE_ATTRIBUTE_MAP.items()) list(RESOURCE_ATTRIBUTE_MAP.items()))
else: else:
return {} return {}

View File

@ -1672,7 +1672,7 @@ class IptablesFirewallEnhancedIpsetTestCase(BaseIptablesFirewallTestCase):
rules = self.firewall._expand_sg_rule_with_remote_ips( rules = self.firewall._expand_sg_rule_with_remote_ips(
rule, port, 'ingress') rule, port, 'ingress')
self.assertEqual(list(rules), self.assertEqual(list(rules),
[dict(rule.items() + [dict(list(rule.items()) +
[('source_ip_prefix', '%s/32' % ip)]) [('source_ip_prefix', '%s/32' % ip)])
for ip in other_ips]) for ip in other_ips])