Commit 82e2b302 by Michael DeHaan

Merge pull request #2835 from b6d/postgres_privs-fix

postgresql_privs: fix wrong codec specification
parents d1a59fe6 119f33ed
......@@ -224,6 +224,7 @@ postgresql_privs: >
try:
import psycopg2
import psycopg2.extensions
except ImportError:
psycopg2 = None
......@@ -266,7 +267,8 @@ class Connection(object):
@property
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment