diff options
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r-- | lib/sqlalchemy/util/langhelpers.py | 12 |
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]) |