postgresql_privs - fix sort comparison (#65125)

The result of .sort() is None, not the sorted object. The comparison was comparing the result of the .sort() method and not the sorted values.
pull/65134/head
Sam Doran 5 years ago committed by GitHub
parent 6a763d7133
commit 426e37ea92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- postgresql_privs - sort results before comparing so that the values are compared and not the result of ``.sort()`` (https://github.com/ansible/ansible/pull/65125)

@ -780,7 +780,9 @@ class Connection(object):
executed_queries.append(query)
self.cursor.execute(query)
status_after = get_status(objs)
return status_before.sort() != status_after.sort()
status_before.sort()
status_after.sort()
return status_before != status_after
class QueryBuilder(object):

Loading…
Cancel
Save