diff options
author | Mark Powers <mark@marks.kitchen> | 2021-07-12 04:19:46 +0100 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2021-07-12 04:19:46 +0100 |
commit | e3f4893b74b97e1de5e126761d9ec6a0f6585888 (patch) | |
tree | 8639ffb0dfe056545d5370802932a8133cfe6083 /main.py | |
parent | c985f5cb690189cfa94078b5990da4776dbd0cf4 (diff) |
Add recording event placeholder
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) |