Skip to content

Commit

Permalink
fixed TplinkRouterProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrErohin committed Nov 6, 2024
1 parent fb180de commit 622fbc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="tplinkrouterc6u",
version="5.0.1",
version="5.0.2",
author="Alex Erohin",
author_email="[email protected]",
description="TP-Link Router API",
Expand Down
4 changes: 3 additions & 1 deletion tplinkrouterc6u/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,10 @@ def get_client(host: str, password: str, username: str = 'admin', logger: Logger
router = TplinkC1200Router(host, password, username, logger, verify_ssl, timeout)
try:
router.authorize()
return router
except AuthorizeError as e:
logger.error(e.__str__())
if logger:
logger.error(e.__str__())
raise ClientException(('Login failed! Please check if your router local password is correct or '
'try to use web encrypted password instead. Check the documentation!'
))
Expand Down

0 comments on commit 622fbc6

Please sign in to comment.