diff options
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -24,15 +24,18 @@ if __name__ == "__main__": hang_up_thread.start() while True: - # Wait for phone to be picked up - phone_held.wait() - # Dial a number try: - dialed = queue.get(block=True, timeout=0.1) - except: - continue - response = dial_manager.dial(dialed) - # If we matched a sequence, play out event - if response is not None: - response.speak() + # Wait for phone to be picked up + phone_held.wait() + # Dial a number + try: + dialed = queue.get(block=True, timeout=0.1) + except: + continue + response = dial_manager.dial(dialed) + # If we matched a sequence, play out event + if response is not None: + response.speak() + except Exception as e: + print(e) |