summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-05-04 14:24:20 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-05-04 14:24:20 -0400
commit6f82c320b8834761fa9606119a4c2cbc6c3312f1 (patch)
tree2dda8376624bde189ee829f8d39534f6d7328be0 /lib/sqlalchemy/engine/base.py
parent8f9b7ad31f0c91b9e2d4ff49e4f5fc6be90c9e6d (diff)
downloadsqlalchemy-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.py16
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