[pypy-commit] pyrepl default: Merged in msabramo/pyrepl/msabramo/ord_char_python3 (pull request #7)

RonnyPfannschmidt noreply at buildbot.pypy.org
Sat Mar 8 09:27:28 CET 2014


Author: Ronny Pfannschmidt <opensource at ronnypfannschmidt.de>
Branch: 
Changeset: r239:bcea63638a4f
Date: 2014-03-08 09:27 +0100
http://bitbucket.org/pypy/pyrepl/changeset/bcea63638a4f/

Log:	Merged in msabramo/pyrepl/msabramo/ord_char_python3 (pull request
	#7)

	pyrepl/unix_eventqueue.py: Fix Python 3 ord(char) issue

diff --git a/pyrepl/unix_eventqueue.py b/pyrepl/unix_eventqueue.py
--- a/pyrepl/unix_eventqueue.py
+++ b/pyrepl/unix_eventqueue.py
@@ -100,7 +100,8 @@
         self.events.append(event)
 
     def push(self, char):
-        self.buf.append(ord(char))
+        ord_char = char if isinstance(char, int) else ord(char)
+        self.buf.append(ord_char)
         if char in self.k:
             if self.k is self.ck:
                 #sanity check, buffer is empty when a special key comes


More information about the pypy-commit mailing list