Skip to content

Commit bbaee4f

Browse files
Add missing psycopg2.extras import (#399)
Fixes #283
1 parent fe8b1e2 commit bbaee4f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- postgresql_query - could crash under certain conditions because of a missing import to `psycopg2.extras` (https://github.com/ansible-collections/community.postgresql/issues/283).

plugins/module_utils/postgres.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
psycopg2 = None # This line needs for unit tests
1919
try:
2020
import psycopg2
21+
import psycopg2.extras
2122
HAS_PSYCOPG2 = True
2223
except ImportError:
2324
HAS_PSYCOPG2 = False

0 commit comments

Comments
 (0)