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:
from sqlalchemy import exc as sa_exceptions
-from sqlalchemy import util
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import eq_
-if util.py2k:
- from exceptions import StandardError, KeyboardInterrupt, SystemExit
-else:
- Exception = BaseException
-
class Error(Exception):
- """This class will be old-style on <= 2.4 and new-style on >=
- 2.5."""
+ pass
class DatabaseError(Error):