summaryrefslogtreecommitdiff
path: root/bin/sql_db.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2010-11-30 12:09:40 +0100
committerOlivier Dony <odo@openerp.com>2010-11-30 12:09:40 +0100
commitf1cfc436a7311d8d1c0b4572ea59a983d65a2cd4 (patch)
treecba13723c5b3a5abd7021b930c467c4a2bafa3b0 /bin/sql_db.py
parent4dd9ccb1b96fe96d7a57023ce1b0ac3db56babe2 (diff)
parent456579b198cd0ec544c90c36226308d298ea93fa (diff)
[MERGE+FIX] fixes for translations,sequence,copy,error messages - some patches courtesy of Margarita Manterola and Don Kirkby
lp bug: https://launchpad.net/bugs/672130 fixed lp bug: https://launchpad.net/bugs/663775 fixed lp bug: https://launchpad.net/bugs/673194 fixed lp bug: https://launchpad.net/bugs/663977 fixed bzr revid: odo@openerp.com-20101130110940-0tf6ra0uwhiptieb
Diffstat (limited to 'bin/sql_db.py')
-rw-r--r--bin/sql_db.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py
index 95d1f7d24be..aed10423bb7 100644
--- a/bin/sql_db.py
+++ b/bin/sql_db.py
@@ -297,7 +297,11 @@ class ConnectionPool(object):
# note: this code is called only if the for loop has completed (no break)
raise PoolError('The Connection Pool Is Full')
- result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
+ try:
+ result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
+ except psycopg2.Error, e:
+ self.__logger.exception('Connection to the database failed')
+ raise
self._connections.append((result, True))
self._debug('Create new connection')
return result