Skip to content

Commit

Permalink
HOTFIX: Fallback if the MODEM_REPORTING ENV does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
erunks committed Nov 13, 2022
1 parent 1f7c6e8 commit 0f3c600
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ModemReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ def __init__(self):
'home': MODEM_ADDRESS,
'logout': MODEM_ADDRESS + '/logout.asp'
}
self.enabled = bool(int(getenv('MODEM_REPORTING')))

try:
self.enabled = bool(int(getenv('MODEM_REPORTING')))
except:
self.enabled = False

def __setup_browser(self):
from mechanicalsoup import StatefulBrowser
Expand Down

0 comments on commit 0f3c600

Please sign in to comment.