summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util
diff options
context:
space:
mode:
authorndparker <ndparker@users.noreply.github.com>2014-10-02 22:00:31 +0200
committerndparker <ndparker@users.noreply.github.com>2014-10-02 22:00:31 +0200
commit690532131d8ce8250c62f1d3e27405902df03e70 (patch)
tree69ef40646aa14519b539ae9d09a16229b7b3e20a /lib/sqlalchemy/util
parentce52dd9e3b71f2074d7821fe62803d4e0eefe512 (diff)
downloadsqlalchemy-pr/140.tar.gz
cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140
Diffstat (limited to 'lib/sqlalchemy/util')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 75c6e7b46..ea8f30e9d 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -490,9 +490,7 @@ def generic_repr(obj, additional_kw=(), to_inspect=None, omit_kwarg=()):
val = getattr(obj, arg, missing)
if val is not missing and val != defval:
output.append('%s=%r' % (arg, val))
- except (SystemExit, KeyboardInterrupt):
- raise
- except:
+ except Exception:
pass
if additional_kw:
@@ -501,9 +499,7 @@ def generic_repr(obj, additional_kw=(), to_inspect=None, omit_kwarg=()):
val = getattr(obj, arg, missing)
if val is not missing and val != defval:
output.append('%s=%r' % (arg, val))
- except (SystemExit, KeyboardInterrupt):
- raise
- except:
+ except Exception:
pass
return "%s(%s)" % (obj.__class__.__name__, ", ".join(output))
@@ -1189,9 +1185,7 @@ def warn_exception(func, *args, **kwargs):
"""
try:
return func(*args, **kwargs)
- except (SystemExit, KeyboardInterrupt):
- raise
- except:
+ except Exception:
warn("%s('%s') ignored" % sys.exc_info()[0:2])