Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Nov 19, 2022
1 parent bd7a6b0 commit eae76de
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/python3_captchaai/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ def _get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_RESULT.valu
if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed):
# if captcha ready\failed or have unknown status - return exist data
return result_data
elif resp.status_code == 401:
raise ValueError("Authentication failed, indicating that the API key is not correct")
else:
raise ValueError(resp.raise_for_status())
except Exception as error:
Expand Down Expand Up @@ -208,8 +206,6 @@ async def _aio_get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_R
if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed):
# if captcha ready\failed or have unknown status - return exist data
return result_data
elif resp.status == 401:
raise ValueError("Authentication failed, indicating that the API key is not correct")
else:
raise ValueError(resp.reason)
except Exception as error:
Expand Down

0 comments on commit eae76de

Please sign in to comment.