From 0426d174e4a608cb09878fe18185b2ae853243ad Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 12 Oct 2014 19:37:14 -0400 Subject: - the test_except test was doing an unnecessary workaround of some kind, take that out, restore the better exception logic in exc --- lib/sqlalchemy/exc.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index 8e65ef07b..5d35dc2e7 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -280,13 +280,9 @@ class DBAPIError(StatementError): connection_invalidated=False): # Don't ever wrap these, just return them directly as if # DBAPIError didn't exist. - if isinstance(orig, (KeyboardInterrupt, SystemExit, DontWrapMixin)): - - # TODO: shouldn't it work this way? see if we can get this - # to work in py3k - #if (isinstance(orig, BaseException) and - # not isinstance(orig, Exception)) or \ - # isinstance(orig, DontWrapMixin): + if (isinstance(orig, BaseException) and + not isinstance(orig, Exception)) or \ + isinstance(orig, DontWrapMixin): return orig if orig is not None: -- cgit v1.2.1