From 30f1a8cbcd3e40c869378740395ad28ed0f1a8ca Mon Sep 17 00:00:00 2001 From: James Woglom Date: Sun, 11 Jun 2023 00:18:46 -0400 Subject: [PATCH] Warn when default username or password is being used --- tconnectsync/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tconnectsync/__init__.py b/tconnectsync/__init__.py index 61c64d1..ae7e2ba 100644 --- a/tconnectsync/__init__.py +++ b/tconnectsync/__init__.py @@ -73,6 +73,12 @@ def main(*args, **kwargs): if time_end < time_start: raise Exception('time_start must be before time_end') + + if TCONNECT_EMAIL == 'email@email.com': + logging.warn('NO USERNAME WAS PROVIDED. Ensure you have set TCONNECT_EMAIL appropriately.') + if TCONNECT_PASSWORD == 'password': + logging.warn('NO PASSWORD WAS PROVIDED. Ensure you have set TCONNECT_PASSWORD appropriately.') + tconnect = TConnectApi(TCONNECT_EMAIL, TCONNECT_PASSWORD) nightscout = NightscoutApi(NS_URL, NS_SECRET, NS_SKIP_TLS_VERIFY)