summaryrefslogtreecommitdiff
path: root/wsgitools/scgi
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r--wsgitools/scgi/asynchronous.py2
-rw-r--r--wsgitools/scgi/forkpool.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 386e1d0..1dee283 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -262,7 +262,7 @@ class SCGIServer(asyncore.dispatcher):
"""asyncore interface"""
try:
ret = self.accept()
- except socket.error, err:
+ except socket.error as err:
# See http://bugs.python.org/issue6706
if err.args[0] not in (errno.ECONNABORTED, errno.EAGAIN):
raise
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index cdd50f0..1bf0c6f 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -41,7 +41,7 @@ class SocketFileWrapper:
return ""
try:
data = self.sock.recv(toread)
- except socket.error, why:
+ except socket.error as why:
if why[0] in (errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN):
data = ""
else:
@@ -250,7 +250,7 @@ class SCGIServer:
self.spawnworker()
try:
rs, _, _ = select.select(self.workers.keys(), [], [])
- except select.error, e:
+ except select.error as e:
if e[0] != errno.EINTR:
raise
rs = []