Skip to content

Commit

Permalink
🔖 1.0.33
Browse files Browse the repository at this point in the history
Signed-off-by: Ludy87 <Ludy87@users.noreply.github.com>
  • Loading branch information
Ludy87 committed Jun 1, 2022
1 parent 71750bf commit b3ceb9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyecotrend_ista/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "1.0.32"
VERSION = "1.0.33"
LOGIN_HEADER = {
"Accept": "application/json, text/plain, */*",
"Accept-Encoding": "gzip, deflate, br",
Expand Down
8 changes: 4 additions & 4 deletions pyecotrend_ista/pyecotrend_ista.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import json
import logging

from pyecotrend_ista.exception_classes import LoginError, ServerError
from .exception_classes import LoginError, ServerError

from .const import LOGIN_HEADER, LOGIN_URL, VERSION

Expand Down Expand Up @@ -60,7 +60,7 @@ async def __login(self) -> str | None:
self._accessToken = json_str_resp["accessToken"]
except Exception as err:
_LOGGER.debug(err)
raise Exception(err)
raise LoginError(err)
finally:
await session.close()
return self._accessToken
Expand Down Expand Up @@ -123,10 +123,10 @@ async def login(self, forceLogin: bool = False) -> str | None:
await sleep(self.retryDelay)
else:
await self.__setAccount()
except Exception as err:
except LoginError as err:
# Login failed
self._accessToken = None
_LOGGER.error(err)
_LOGGER.debug(err)
return self._accessToken

async def consum_raw(self) -> Dict[str, Any]:
Expand Down

0 comments on commit b3ceb9c

Please sign in to comment.