summaryrefslogtreecommitdiff
path: root/paste/urlparser.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/urlparser.py
parent674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff)
downloadpaste-fbd07d8a7cf88daf5d821601578d2f7bc1c92928.tar.gz
Python 3: Replace "except Exception, exc" with "except Exception as exc:"
Diffstat (limited to 'paste/urlparser.py')
-rw-r--r--paste/urlparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/urlparser.py b/paste/urlparser.py
index a7469e3..4174bf7 100644
--- a/paste/urlparser.py
+++ b/paste/urlparser.py
@@ -368,7 +368,7 @@ def load_module_from_name(environ, filename, module_name, errors):
if not os.path.exists(init_filename):
try:
f = open(init_filename, 'w')
- except (OSError, IOError), e:
+ except (OSError, IOError) as e:
errors.write(
'Cannot write __init__.py file into directory %s (%s)\n'
% (os.path.dirname(filename), e))
@@ -574,7 +574,7 @@ class PkgResourcesParser(StaticURLParser):
# @@: I don't know what to do with the encoding.
try:
file = self.egg.get_resource_stream(self.manager, resource)
- except (IOError, OSError), e:
+ except (IOError, OSError) as e:
exc = httpexceptions.HTTPForbidden(
'You are not permitted to view this file (%s)' % e)
return exc.wsgi_application(environ, start_response)