summaryrefslogtreecommitdiff
path: root/paste/fileapp.py
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:35 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:35 +0100
commitfbd07d8a7cf88daf5d821601578d2f7bc1c92928 (patch)
tree85154672d76bd72b10b6277a5189e1b6587ae11a /paste/fileapp.py
parent674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff)
downloadpaste-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.py6
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(