summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-05-13 11:34:31 +0200
committermathieui <mathieui@mathieui.net>2011-05-13 11:34:31 +0200
commit2860232cc6a70894f8104474bcf8a3a861ac79ac (patch)
tree031443cef62fd569647f628a9c0d075484def593 /src/windows.py
parentc631673cf315dcaadb0c2a76a9e0d62dc840766b (diff)
downloadpoezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.gz
poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.bz2
poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.tar.xz
poezio-2860232cc6a70894f8104474bcf8a3a861ac79ac.zip
Fix a traceback on C-c ❶ or C-c ², etc
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/windows.py b/src/windows.py
index 85584152..058f08ce 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -126,7 +126,7 @@ class Win(object):
self._win.attron(curses.A_UNDERLINE)
elif attr_char == 'b':
self._win.attron(curses.A_BOLD)
- elif attr_char.isnumeric():
+ elif attr_char in string.digits:
self._win.attron(common.curses_color_pair(int(attr_char)))
next_attr_char = text.find('\x19')
self.addstr(text)
@@ -1125,7 +1125,7 @@ class MessageInput(Input):
Read one more char (c) and add \x19c to the string
"""
attr_char = self.core.read_keyboard()
- if attr_char in self.text_attributes or (attr_char.isnumeric() and int(attr_char) < 7):
+ if attr_char in self.text_attributes or (attr_char in string.digits and int(attr_char) < 7):
self.do_command('\x19', False)
self.do_command(attr_char)