diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-29 04:59:34 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-29 04:59:34 (GMT) |
commit | 2b149860a052606500cc4293db29cde5c85bf288 (patch) | |
tree | e79d9b5424ccc490b6d799621bf7c4d0f93159d1 /Lib/idlelib/PyShell.py | |
parent | 8eab008b53c9aeb1ceabac378ec4bf306fdde44b (diff) | |
download | cpython-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.py | 8 |
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) |