Removing cmp from ec2_vpc_net.py to be compatible with Python3 (#21202)

* Removing cmp to be compatible with Python3

* fix syntax

* Added an overlooked return

* Fixing making  things overly complicated

* Simplifying since tags will always be hashable. Don't need to use cmp at all.
pull/21272/head
s-hertel 8 years ago committed by Ryan Brown
parent 2dc42fce80
commit 84135ef7ad

@ -150,7 +150,7 @@ def update_vpc_tags(vpc, module, vpc_obj, tags, name):
tags.update({'Name': name})
try:
current_tags = dict((t.name, t.value) for t in vpc.get_all_tags(filters={'resource-id': vpc_obj.id}))
if cmp(tags, current_tags):
if tags != current_tags:
if not module.check_mode:
vpc.create_tags(vpc_obj.id, tags)
return True

Loading…
Cancel
Save