Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Resolve #12 - Terminate if modem is not assignable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsanford committed Jul 23, 2023
1 parent 70c7d85 commit d5e9aa6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
log.info("Notify-only enabled - dialing blocked.")

# Open the modem
modem = serial.Serial(port='/dev/ttyACM0', baudrate=57600,
timeout=TIMEOUT, write_timeout=TIMEOUT)
try:
modem = serial.Serial(port='/dev/ttyACM0', baudrate=57600,
timeout=TIMEOUT, write_timeout=TIMEOUT)
except:
sys.exit(1)


def configure_modem():
Expand Down

0 comments on commit d5e9aa6

Please sign in to comment.