mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Port postgresql module to python3 (#4579)
Iteritems is no longer a dict method in Python3, replace it with the six wrapper.
This commit is contained in:
parent
839d5b6de4
commit
f59af7d29e
2 changed files with 18 additions and 20 deletions
|
@ -114,6 +114,7 @@ except ImportError:
|
|||
postgresqldb_found = False
|
||||
else:
|
||||
postgresqldb_found = True
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
class NotSupportedError(Exception):
|
||||
pass
|
||||
|
@ -261,7 +262,7 @@ def main():
|
|||
"login_password":"password",
|
||||
"port":"port"
|
||||
}
|
||||
kw = dict( (params_map[k], v) for (k, v) in module.params.iteritems()
|
||||
kw = dict( (params_map[k], v) for (k, v) in iteritems(module.params)
|
||||
if k in params_map and v != '' )
|
||||
|
||||
# If a login_unix_socket is specified, incorporate it here.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue