[pypy-commit] pypy py3k: Fix module.test_lib_pypy.pyrepl.test_readline when run by python2

amauryfa noreply at buildbot.pypy.org
Sat Jun 29 14:45:48 CEST 2013


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r65094:cc7ed4b513e0
Date: 2013-06-29 14:45 +0200
http://bitbucket.org/pypy/pypy/changeset/cc7ed4b513e0/

Log:	Fix module.test_lib_pypy.pyrepl.test_readline when run by python2

	(in this file unicode is also defined for py3k, it's an alias to
	str)

diff --git a/lib_pypy/pyrepl/reader.py b/lib_pypy/pyrepl/reader.py
--- a/lib_pypy/pyrepl/reader.py
+++ b/lib_pypy/pyrepl/reader.py
@@ -524,7 +524,7 @@
 
     def do_cmd(self, cmd):
         #print cmd
-        if isinstance(cmd[0], str):
+        if isinstance(cmd[0], (str, unicode)):
             cmd = self.commands.get(cmd[0],
                                     commands.invalid_command)(self, *cmd)
         elif isinstance(cmd[0], type):


More information about the pypy-commit mailing list