changeset 613:7261e7d6368d

merge.
author lamblinp@ip03.m
date Fri, 16 Jan 2009 19:10:50 -0500
parents 5a7927691d2c (diff) d0c2c33a620f (current diff)
children f6c74f34cd35 a88ead1a1537
files
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dbdict/sql.py	Fri Jan 16 16:27:44 2009 -0500
+++ b/pylearn/dbdict/sql.py	Fri Jan 16 19:10:50 2009 -0500
@@ -1,5 +1,7 @@
 
-import sys, os, copy
+import sys, os, copy, time
+
+import numpy.random
 
 import sqlalchemy
 from sqlalchemy import create_engine, desc
@@ -102,7 +104,8 @@
                 # no jobs are left
                 keep_trying = False
         except (psycopg2.OperationalError,
-                sqlalchemy.exceptions.ProgrammingError), e:
+                sqlalchemy.exceptions.ProgrammingError,
+                sqlalchemy.exc.DBAPIError), e:
             #either the first() or the commit() raised
             s.rollback() # docs say to do this (or close) after commit raises exception
             if verbose: print 'caught exception', e