From 13d1dac581369c8522cbafcfa103d2a5c36ac3d6 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 23 Mar 2021 19:33:17 +0300 Subject: call api.auth() before some actions, just in case --- main.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3