mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07: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})
|
tags.update({'Name': name})
|
||||||
try:
|
try:
|
||||||
current_tags = dict((t.name, t.value) for t in vpc.get_all_tags(filters={'resource-id': vpc_obj.id}))
|
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:
|
if not module.check_mode:
|
||||||
vpc.create_tags(vpc_obj.id, tags)
|
vpc.create_tags(vpc_obj.id, tags)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue