Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The postgresql_privs module adds default arguments to the connection method #4043

Closed
abompard opened this issue Sep 5, 2013 · 0 comments · Fixed by #4044
Closed

The postgresql_privs module adds default arguments to the connection method #4043

abompard opened this issue Sep 5, 2013 · 0 comments · Fixed by #4044
Labels
bug This issue/PR relates to a bug.

Comments

@abompard
Copy link
Contributor

abompard commented Sep 5, 2013

The connection method in psycopg2 must not contain keyword arguments when they should be left to a default value (None will not work). As a result, when connecting via socket is desired, the postgresql_privs module will error out with this message:

File "/tmp/ansible-1378419279.94-205411105299342/postgresql_privs", line 1495, in <module>
    main()
  File "/tmp/ansible-1378419279.94-205411105299342/postgresql_privs", line 544, in main
    conn = Connection(p.host, p.port, p.login, p.password, p.database)
  File "/tmp/ansible-1378419279.94-205411105299342/postgresql_privs", line 256, in __init__
    password=password, database=database
TypeError: argument 3 must be string, not None

The other postgresql modules (*_db and *_user) already implement parameter filtering, it could be copied from them.

@jimi-c jimi-c closed this as completed in 5a949dc Sep 6, 2013
henrysher pushed a commit to henrysher/fedora-infra-ansible that referenced this issue Jan 13, 2014
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants