summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
commit4b614b9b35cd2baddb7ca67c04bee5d70ec6a172 (patch)
tree7483cd269f5823f903f96709eb864fff9b6d9383 /lib/sqlalchemy/engine/base.py
parent9716a5c45e6185c5871555722d8495880f0e8c7a (diff)
downloadsqlalchemy-4b614b9b35cd2baddb7ca67c04bee5d70ec6a172.tar.gz
- the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index b4c9b1e1c..9eb3d6128 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -9,7 +9,7 @@
"""
-from __future__ import with_statement
+
import sys
from .. import exc, schema, util, log, interfaces
from ..sql import expression, util as sql_util
@@ -460,7 +460,7 @@ class Connection(Connectable):
try:
self.engine.dialect.do_begin(self.connection)
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(e, None, None, None, None)
def _rollback_impl(self):
@@ -473,7 +473,7 @@ class Connection(Connectable):
try:
self.engine.dialect.do_rollback(self.connection)
self.__transaction = None
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(e, None, None, None, None)
else:
self.__transaction = None
@@ -487,7 +487,7 @@ class Connection(Connectable):
try:
self.engine.dialect.do_commit(self.connection)
self.__transaction = None
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(e, None, None, None, None)
def _savepoint_impl(self, name=None):
@@ -688,7 +688,7 @@ class Connection(Connectable):
dialect = self.dialect
ctx = dialect.execution_ctx_cls._init_default(
dialect, self, conn)
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(e, None, None, None, None)
ret = ctx._exec_default(default, None)
@@ -734,7 +734,7 @@ class Connection(Connectable):
distilled_params = _distill_params(multiparams, params)
if distilled_params:
- keys = distilled_params[0].keys()
+ keys = list(distilled_params[0].keys())
else:
keys = []
@@ -822,7 +822,7 @@ class Connection(Connectable):
conn = self._revalidate_connection()
context = constructor(dialect, self, conn, *args)
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(e,
str(statement), parameters,
None, None)
@@ -865,7 +865,7 @@ class Connection(Connectable):
statement,
parameters,
context)
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(
e,
statement,
@@ -939,7 +939,7 @@ class Connection(Connectable):
cursor,
statement,
parameters)
- except Exception, e:
+ except Exception as e:
self._handle_dbapi_exception(
e,
statement,
@@ -954,7 +954,7 @@ class Connection(Connectable):
"""
try:
cursor.close()
- except Exception, e:
+ except Exception as e:
try:
ex_text = str(e)
except TypeError:
@@ -1045,7 +1045,7 @@ class Connection(Connectable):
Compiled: _execute_compiled,
schema.SchemaItem: _execute_default,
schema.DDLElement: _execute_ddl,
- basestring: _execute_text
+ str: _execute_text
}
def default_schema_name(self):