for i in range(3):
try:
value = self._lookup_unsafe(name, cls, type, timeout = None)
- except (psycopg2.OperationalError, sqlalchemy.exceptions.SQLError):
+ except (psycopg2.OperationalError, sqlalchemy.exceptions.DBAPIError):
if i == 2:
raise
print "Reloading database"