mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Make postgresql module in extras compile on py3
This commit is contained in:
parent
6963cd8ae7
commit
95929fb79f
3 changed files with 10 additions and 6 deletions
|
@ -222,7 +222,8 @@ def main():
|
|||
try:
|
||||
db_connection = psycopg2.connect(**kw)
|
||||
cursor = db_connection.cursor()
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
e = get_exception()
|
||||
module.fail_json(msg="unable to connect to database: %s" % e)
|
||||
changed = False
|
||||
lang_dropped = False
|
||||
|
@ -267,4 +268,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue