before claude fix #1

This commit is contained in:
2025-12-23 06:32:30 -08:00
parent a23fa1b30d
commit e6d85ff4fe
5 changed files with 128 additions and 230 deletions

View File

@@ -20,14 +20,9 @@ class GarminClient(AuthMixin, DataMixin):
garth.configure(domain="garmin.cn")
if username and password:
logger.info(f"Attempting to authenticate Garmin user: {username}")
if not self.load_tokens():
logger.info("No valid tokens found, attempting fresh login")
self.login()
else:
logger.info("Successfully loaded existing tokens, skipping fresh login")
logger.info(f"GarminClient initialized for user: {username}")
else:
logger.debug("No username/password provided during initialization")
logger.debug("GarminClient initialized without credentials")
def check_connection(self) -> bool:
"""Check if the connection to Garmin is still valid."""