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/fileapp.py | |
parent | 674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff) | |
download | paste-fbd07d8a7cf88daf5d821601578d2f7bc1c92928.tar.gz |
Python 3: Replace "except Exception, exc" with "except Exception as exc:"
Diffstat (limited to 'paste/fileapp.py')
-rw-r--r-- | paste/fileapp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paste/fileapp.py b/paste/fileapp.py index 6c42072..3825386 100644 --- a/paste/fileapp.py +++ b/paste/fileapp.py @@ -123,7 +123,7 @@ class DataApp(object): head.delete(headers) start_response('304 Not Modified', headers) return [''] - except HTTPBadRequest, exce: + except HTTPBadRequest as exce: return exce.wsgi_application(environ, start_response) # If we get If-None-Match and If-Modified-Since, and @@ -139,7 +139,7 @@ class DataApp(object): head.delete(headers) start_response('304 Not Modified', headers) return [''] # empty body - except HTTPBadRequest, exce: + except HTTPBadRequest as exce: return exce.wsgi_application(environ, start_response) (lower, upper) = (0, self.content_length - 1) @@ -215,7 +215,7 @@ class FileApp(DataApp): return exc(environ, start_response) try: file = open(self.filename, 'rb') - except (IOError, OSError), e: + except (IOError, OSError) as e: exc = HTTPForbidden( 'You are not permitted to view this file (%s)' % e) return exc.wsgi_application( |