diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-04 14:24:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-04 14:24:20 -0400 |
commit | 6f82c320b8834761fa9606119a4c2cbc6c3312f1 (patch) | |
tree | 2dda8376624bde189ee829f8d39534f6d7328be0 /lib/sqlalchemy/engine/base.py | |
parent | 8f9b7ad31f0c91b9e2d4ff49e4f5fc6be90c9e6d (diff) | |
download | sqlalchemy-6f82c320b8834761fa9606119a4c2cbc6c3312f1.tar.gz |
use logging to output exc_info here
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index d4ced4cca..c2ba0922b 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -956,17 +956,11 @@ class Connection(Connectable): """ try: cursor.close() - except Exception as e: - try: - ex_text = str(e) - except TypeError: - ex_text = repr(e) - if not self.closed: - self.connection._logger.warn( - "Error closing cursor: %s", ex_text) - - if isinstance(e, (SystemExit, KeyboardInterrupt)): - raise + except (SystemExit, KeyboardInterrupt): + raise + except Exception: + self.connection._logger.error( + "Error closing cursor", exc_info=True) _reentrant_error = False _is_disconnect = False |