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/evalexception/middleware.py | |
parent | 674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff) | |
download | paste-fbd07d8a7cf88daf5d821601578d2f7bc1c92928.tar.gz |
Python 3: Replace "except Exception, exc" with "except Exception as exc:"
Diffstat (limited to 'paste/evalexception/middleware.py')
-rw-r--r-- | paste/evalexception/middleware.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paste/evalexception/middleware.py b/paste/evalexception/middleware.py index a31d7e1..455758a 100644 --- a/paste/evalexception/middleware.py +++ b/paste/evalexception/middleware.py @@ -146,7 +146,7 @@ def get_debug_info(func): % debugcount) debug_info = self.debug_infos[debugcount] return func(self, debug_info=debug_info, **form) - except ValueError, e: + except ValueError as e: form['headers']['status'] = '500 Server Error' return '<html>There was an error: %s</html>' % html_quote(e) return debug_info_replacement @@ -457,8 +457,8 @@ def make_table(items): out = StringIO() try: pprint.pprint(value, out) - except Exception, e: - print >> out, 'Error: %s' % e + except Exception as e: + print('Error: %s' % e, file=out) value = html_quote(out.getvalue()) if len(value) > 100: # @@: This can actually break the HTML :( |