Use psycopg2cffi only if there is no psycopg2
issue11329 review354791002
This commit is contained in:
@@ -12,11 +12,12 @@ from itertools import chain, repeat
|
||||
from threading import RLock
|
||||
|
||||
try:
|
||||
from psycopg2 import connect
|
||||
except ImportError:
|
||||
from psycopg2cffi import compat
|
||||
compat.register()
|
||||
except ImportError:
|
||||
pass
|
||||
from psycopg2 import Binary, connect
|
||||
from psycopg2 import connect
|
||||
from psycopg2 import Binary
|
||||
from psycopg2.extensions import (
|
||||
ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_REPEATABLE_READ, UNICODE, AsIs,
|
||||
cursor, register_adapter, register_type)
|
||||
|
||||
Reference in New Issue
Block a user