1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #2835 from b6d/postgres_privs-fix

postgresql_privs: fix wrong codec specification
This commit is contained in:
Michael DeHaan 2013-05-05 09:44:25 -07:00
commit 82e2b3028f

View file

@ -224,6 +224,7 @@ postgresql_privs: >
try: try:
import psycopg2 import psycopg2
import psycopg2.extensions
except ImportError: except ImportError:
psycopg2 = None psycopg2 = None
@ -266,7 +267,8 @@ class Connection(object):
@property @property
def encoding(self): def encoding(self):
return self.connection.encoding """Connection encoding in Python-compatible form"""
return psycopg2.extensions.encodings[self.connection.encoding]
### Methods for querying database objects ### Methods for querying database objects