diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:47:35 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:47:35 +0100 |
commit | fbd07d8a7cf88daf5d821601578d2f7bc1c92928 (patch) | |
tree | 85154672d76bd72b10b6277a5189e1b6587ae11a /paste/exceptions | |
parent | 674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff) | |
download | paste-fbd07d8a7cf88daf5d821601578d2f7bc1c92928.tar.gz |
Python 3: Replace "except Exception, exc" with "except Exception as exc:"
Diffstat (limited to 'paste/exceptions')
-rw-r--r-- | paste/exceptions/formatter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/exceptions/formatter.py b/paste/exceptions/formatter.py index e1fadbe..a613479 100644 --- a/paste/exceptions/formatter.py +++ b/paste/exceptions/formatter.py @@ -220,7 +220,7 @@ class TextFormatter(AbstractFormatter): for n, v in items: try: v = repr(v) - except Exception, e: + except Exception as e: v = 'Cannot display: %s' % e v = truncate(v) lines.append(' %s: %s' % (n, v)) @@ -310,7 +310,7 @@ class HTMLFormatter(TextFormatter): for name, value in rows: try: value = repr(value) - except Exception, e: + except Exception as e: value = 'Cannot print: %s' % e odd = not odd table.append( |