summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-06-29 04:59:34 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-06-29 04:59:34 (GMT)
commit2b149860a052606500cc4293db29cde5c85bf288 (patch)
treee79d9b5424ccc490b6d799621bf7c4d0f93159d1 /Lib/idlelib/PyShell.py
parent8eab008b53c9aeb1ceabac378ec4bf306fdde44b (diff)
downloadcpython-2b149860a052606500cc4293db29cde5c85bf288.zip
cpython-2b149860a052606500cc4293db29cde5c85bf288.tar.gz
cpython-2b149860a052606500cc4293db29cde5c85bf288.tar.bz2
Issue #18316: Update idlelib 2.7 except clauses to ease backports.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index e936bd2..0acfe4a 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -430,7 +430,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
try:
self.rpcclt = MyRPCClient(addr)
break
- except socket.error, err:
+ except socket.error as err:
pass
else:
self.display_port_binding_error()
@@ -451,7 +451,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
self.rpcclt.listening_sock.settimeout(10)
try:
self.rpcclt.accept()
- except socket.timeout, err:
+ except socket.timeout as err:
self.display_no_subprocess_error()
return None
self.rpcclt.register("console", self.tkconsole)
@@ -486,7 +486,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
self.spawn_subprocess()
try:
self.rpcclt.accept()
- except socket.timeout, err:
+ except socket.timeout as err:
self.display_no_subprocess_error()
return None
self.transfer_path(with_cwd=with_cwd)
@@ -1458,7 +1458,7 @@ def main():
startup = False
try:
opts, args = getopt.getopt(sys.argv[1:], "c:deihnr:st:")
- except getopt.error, msg:
+ except getopt.error as msg:
sys.stderr.write("Error: %s\n" % str(msg))
sys.stderr.write(usage_msg)
sys.exit(2)