From b3b00bb611b4ce2be2c1417d510d283f94ac1a4d Mon Sep 17 00:00:00 2001 From: fgau Date: Sun, 31 Aug 2008 09:54:32 +0000 Subject: [PATCH] added isdigit in correct syntax git-svn-id: http://www.neo1973-germany.de/svn@111 46df4e5c-bc4e-4628-a0fc-830ba316316d --- epydial/epydial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epydial/epydial.py b/epydial/epydial.py index 40ad753..cb75c3a 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -126,7 +126,7 @@ class MainScreen(EdjeGroup): @edje.decorators.signal_callback("dialer_send", "*") def on_edje_signal_numberkey_triggered(self, emission, source): if self.res['code'] != 'READY': - if len(self.text) < 4 and source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"): + if len(self.text) < 4 and source.isdigit(): self.text.append(source) print ''.join(self.text) self.part_text_set("numberdisplay_text", '*' * len(self.text)) @@ -143,7 +143,7 @@ class MainScreen(EdjeGroup): self.part_text_set("numberdisplay_text", "please dial") self.text = [] else: - if source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "#", "*"): + if source.isdigit() or source in ('*', '#'): self.text.append(source) print ''.join(self.text) self.part_text_set("numberdisplay_text", "".join(self.text))