summaryrefslogtreecommitdiff
path: root/paste/util
diff options
context:
space:
mode:
Diffstat (limited to 'paste/util')
-rw-r--r--paste/util/PySourceColor.py2
-rw-r--r--paste/util/import_string.py4
-rw-r--r--paste/util/scgiserver.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/paste/util/PySourceColor.py b/paste/util/PySourceColor.py
index d9f451f..64c0f56 100644
--- a/paste/util/PySourceColor.py
+++ b/paste/util/PySourceColor.py
@@ -1311,7 +1311,7 @@ class Parser(object):
# Parse the source and write out the results.
try:
tokenize.tokenize(text.readline, self)
- except tokenize.TokenError, ex:
+ except tokenize.TokenError as ex:
msg = ex[0]
line = ex[1][0]
self.out.write("<h3>ERROR: %s</h3>%s\n"%
diff --git a/paste/util/import_string.py b/paste/util/import_string.py
index 3feb4dd..a10db18 100644
--- a/paste/util/import_string.py
+++ b/paste/util/import_string.py
@@ -47,7 +47,7 @@ def simple_import(s):
try:
module = import_module(name)
parts = parts[1:]
- except ImportError, e:
+ except ImportError as e:
last_import_error = e
break
obj = module
@@ -79,7 +79,7 @@ def try_import_module(module_name):
"""
try:
return import_module(module_name)
- except ImportError, e:
+ except ImportError as e:
if not getattr(e, 'args', None):
raise
desc = e.args[0]
diff --git a/paste/util/scgiserver.py b/paste/util/scgiserver.py
index d20c952..7963ed6 100644
--- a/paste/util/scgiserver.py
+++ b/paste/util/scgiserver.py
@@ -131,7 +131,7 @@ class SWAP(scgi_server.SCGIHandler):
input.close()
output.close()
conn.close()
- except IOError, err:
+ except IOError as err:
debug("IOError while closing connection ignored: %s" % err)