summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/sqlite/pysqlite.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-07-01 16:52:11 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-07-01 16:52:11 -0400
commite936a7b359a205e0476b932a1f175f5da7289e06 (patch)
tree161e369330c3446b6bbd122fc2a4cdbadda00317 /lib/sqlalchemy/dialects/sqlite/pysqlite.py
parent409a95adf44f577a204114469ff414bebefca293 (diff)
downloadsqlalchemy-e936a7b359a205e0476b932a1f175f5da7289e06.tar.gz
- Failures on connect which raise dbapi.Error
will forward the error to dialect.is_disconnect() and set the "connection_invalidated" flag if the dialect knows this to be a potentially "retryable" condition. Only Oracle ORA-01033 implemented for now. [ticket:2201] - Added ORA-01033 to disconnect codes, which can be caught during a connection event. [ticket:2201]
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/pysqlite.py')
-rw-r--r--lib/sqlalchemy/dialects/sqlite/pysqlite.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
index 07df64712..c8739f242 100644
--- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py
+++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
@@ -289,6 +289,7 @@ class SQLiteDialect_pysqlite(SQLiteDialect):
return ([filename], opts)
def is_disconnect(self, e, connection, cursor):
- return isinstance(e, self.dbapi.ProgrammingError) and "Cannot operate on a closed database." in str(e)
+ return isinstance(e, self.dbapi.ProgrammingError) and \
+ "Cannot operate on a closed database." in str(e)
dialect = SQLiteDialect_pysqlite