Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 (#65903)
* Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 * add changelog
This commit is contained in:
parent
ec0885cf05
commit
9b85a51c64
2 changed files with 12 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- postgresql_privs - fix sorting lists with None elements for python3 (https://github.com/ansible/ansible/issues/65761).
|
|
@ -780,8 +780,16 @@ class Connection(object):
|
|||
executed_queries.append(query)
|
||||
self.cursor.execute(query)
|
||||
status_after = get_status(objs)
|
||||
status_before.sort()
|
||||
status_after.sort()
|
||||
|
||||
def nonesorted(e):
|
||||
# For python 3+ that can fail trying
|
||||
# to compare NoneType elements by sort method.
|
||||
if e is None:
|
||||
return ''
|
||||
return e
|
||||
|
||||
status_before.sort(key=nonesorted)
|
||||
status_after.sort(key=nonesorted)
|
||||
return status_before != status_after
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue