Fix missing import psycopg to psycopg2

This commit is contained in:
Cédric Krier committed 2008-02-21 23:53:42 +01:00
1 parent 5ad40d33b6
commit 12332f82c5
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -22,7 +22,7 @@
(6, ?, ids) set a list of links
"""
import psycopg
import psycopg2
import warnings
import __builtin__
@@ -174,7 +174,7 @@ time = Time
class Binary(_column):
_type = 'binary'
_symbol_c = '%s'
_symbol_f = lambda symb: symb and psycopg.Binary(symb) or None
_symbol_f = lambda symb: symb and psycopg2.Binary(symb) or None
_symbol_set = (_symbol_c, _symbol_f)
binary = Binary
+1 -1
View File
@@ -5,7 +5,7 @@ from trytond.netsvc import Service, LocalService, Logger, LOG_ERROR
from trytond import pooler
import copy
import sys
from psycopg import IntegrityError
from psycopg2 import IntegrityError
from trytond.tools import UpdateableDict
MODULE_LIST = []
+2 -2
View File
@@ -31,7 +31,7 @@
import sys, os, signal
import netsvc
import time
import psycopg
import psycopg2
import pooler
import sql_db
import config
@@ -77,7 +77,7 @@ class TrytonServer(object):
try:
if db_name:
cursor = pooler.get_db_only(db_name).cursor()
except psycopg.OperationalError:
except psycopg2.OperationalError:
self.logger.notify_channel("init", netsvc.LOG_INFO,
"could not connect to database '%s'!" % db_name,)