mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
committed by
Matt Clay
parent
839d5b6de4
commit
f59af7d29e
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user