Skip to content

Commit

Permalink
Recognize "password wrong" error
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed May 14, 2024
1 parent 9f67270 commit 839e7a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4269,10 +4269,10 @@ async def send_chunk(

if len(data) < 500 and response.content_type == "text/html":
if isinstance(data, bytes):
login_err = b'"detail" : "invalid user"' in data or b'"detail" : "login failed"' in data or b'detail" : "please login first' in data
login_err = b'"detail" : "invalid user"' in data or b'"detail" : "login failed"' in data or b'detail" : "please login first' in data or b'"detail" : "password wrong"' in data
else:
login_err = (
'"detail" : "invalid user"' in data or '"detail" : "login failed"' in data or 'detail" : "please login first' in data
'"detail" : "invalid user"' in data or '"detail" : "login failed"' in data or '"detail" : "please login first"' in data or '"detail" : "password wrong"' in data
) and cur_command != "Logout"
if login_err:
response.release()
Expand Down

0 comments on commit 839e7a2

Please sign in to comment.