aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-23 19:33:17 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-23 19:33:17 +0300
commit13d1dac581369c8522cbafcfa103d2a5c36ac3d6 (patch)
treecc156856e396a569faf01c9c4f5f015719beedc2
parent3f1b943e2c3180683341e2bd26724b690e81f1c2 (diff)
call api.auth() before some actions, just in caseHEADmaster
-rw-r--r--main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index 3c60739..9d19f36 100644
--- a/main.py
+++ b/main.py
@@ -27,6 +27,7 @@ def sms_handler(sms: SMS, api: WebAPI):
text = sms.text.lower().strip()
if text == 'you shall reboot!':
print('bye bye...')
+ api.auth()
api.reboot()
elif text == 'yo, get me some status':
@@ -53,10 +54,12 @@ def sms_handler(sms: SMS, api: WebAPI):
elif text == 'switch it off':
print('switching it off')
+ api.auth()
api.dataswitch(False)
elif text == 'switch it on':
print('switching it on')
+ api.auth()
api.dataswitch(True)