Skip to content

Commit d6e00e2

Browse files
Merged in msabramo/pyrepl/msabramo/ord_char_python3 (pull request #7)
pyrepl/unix_eventqueue.py: Fix Python 3 ord(char) issue
2 parents ee767d8 + 7423709 commit d6e00e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyrepl/unix_eventqueue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def insert(self, event):
100100
self.events.append(event)
101101

102102
def push(self, char):
103-
self.buf.append(ord(char))
103+
ord_char = char if isinstance(char, int) else ord(char)
104+
self.buf.append(ord_char)
104105
if char in self.k:
105106
if self.k is self.ck:
106107
#sanity check, buffer is empty when a special key comes

0 commit comments

Comments
 (0)