mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
2dc42fce80
commit
84135ef7ad
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue