Skip to content

Commit

Permalink
Update meross_client.py
Browse files Browse the repository at this point in the history
Reformatted to pass test
  • Loading branch information
jeloneal authored Jun 23, 2024
1 parent f418ffd commit fd5c235
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/octoprint_psucontrol_meross/meross_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module converts async meross-iot library to synchronous bindings flask handle can use."""

import asyncio
import dataclasses

Expand Down Expand Up @@ -123,12 +124,14 @@ async def login(self, api_base_url: str, user: str, password: str, raise_exc: bo
if restore_success:
self._logger.debug("Restored saved session.")
return True
# if len(api_base_url) > 0 and "https://" not in api_base_url:
# self._logger.info(f"Adding missing \"https://\" prefix to {api_base_url!r}.")
# api_base_url = "https://" + api_base_url.replace("'", "")
# if len(api_base_url) > 0 and "https://" not in api_base_url:
# self._logger.info(f"Adding missing \"https://\" prefix to {api_base_url!r}.")
# api_base_url = "https://" + api_base_url.replace("'", "")
else:
api_base_url = api_base_url
self._logger.info(f"Performing full auth login for the user {user!r} against {api_base_url!r}.")
self._logger.info(
f"Performing full auth login for the user {user!r} against {api_base_url!r}."
)
try:
self.api_client = await MerossHttpClient.async_from_user_password(
api_base_url=api_base_url, email=user, password=password
Expand Down

0 comments on commit fd5c235

Please sign in to comment.