changeset a29ade556c9b in trytond:6.2
details: https://hg.tryton.org/trytond?cmd=changeset&node=a29ade556c9b
description:
Use psycopg2cffi only if there is no psycopg2
issue11329
review354791002
(grafted from 6001f228e80a92f624339150dd8b8f595f49df8d)
diffstat:
trytond/backend/postgresql/database.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r acfc4dd4a177 -r a29ade556c9b trytond/backend/postgresql/database.py
--- a/trytond/backend/postgresql/database.py Fri Apr 01 23:48:06 2022 +0200
+++ b/trytond/backend/postgresql/database.py Wed Apr 06 18:40:49 2022 +0200
@@ -12,11 +12,12 @@
from threading import RLock
try:
+ from psycopg2 import connect
+except ImportError:
from psycopg2cffi import compat
compat.register()
-except ImportError:
- pass
-from psycopg2 import connect, Binary
+ from psycopg2 import connect
+from psycopg2 import Binary
from psycopg2.sql import SQL, Identifier
from psycopg2.pool import ThreadedConnectionPool, PoolError
from psycopg2.extensions import cursor