[pypy-commit] pypy py3k: Syntax fixes for "import readline"

amauryfa noreply at buildbot.pypy.org
Sun Dec 18 14:42:28 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r50651:95d16ee05f34
Date: 2011-12-18 13:08 +0100
http://bitbucket.org/pypy/pypy/changeset/95d16ee05f34/

Log:	Syntax fixes for "import readline"

diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py
--- a/lib_pypy/pyrepl/unix_console.py
+++ b/lib_pypy/pyrepl/unix_console.py
@@ -407,7 +407,7 @@
         self.partial_char += char
         try:
             c = unicode(self.partial_char, self.encoding)
-        except UnicodeError, e:
+        except UnicodeError as e:
             if len(e.args) > 4 and \
                    e.args[4] == 'unexpected end of data':
                 pass
@@ -427,7 +427,7 @@
             while 1: # All hail Unix!
                 try:
                     self.push_char(os.read(self.input_fd, 1))
-                except (IOError, OSError), err:
+                except (IOError, OSError) as err:
                     if err.errno == errno.EINTR:
                         if not self.event_queue.empty():
                             return self.event_queue.get()


More information about the pypy-commit mailing list