summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/threadlocal.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/engine/threadlocal.py')
-rw-r--r--lib/sqlalchemy/engine/threadlocal.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sqlalchemy/engine/threadlocal.py b/lib/sqlalchemy/engine/threadlocal.py
index 5b2bdabc0..b34d510f7 100644
--- a/lib/sqlalchemy/engine/threadlocal.py
+++ b/lib/sqlalchemy/engine/threadlocal.py
@@ -13,10 +13,11 @@ This module is semi-private and is invoked automatically when the threadlocal
engine strategy is used.
"""
-from .. import util
-from . import base
import weakref
+from . import base
+from .. import util
+
class TLConnection(base.Connection):
def __init__(self, *arg, **kw):
@@ -92,8 +93,8 @@ class TLEngine(base.Engine):
def __enter__(self):
return self
- def __exit__(self, type, value, traceback):
- if type is None:
+ def __exit__(self, type_, value, traceback):
+ if type_ is None:
self.commit()
else:
self.rollback()