Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/vws/async_vws.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ async def make_request(
# The Vuforia API returns a 429 response with no JSON body.
raise TooManyRequestsError(response=response)

if (
response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR
): # pragma: no cover
if response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR:
raise ServerError(response=response)

result_code = string_field(
Expand Down Expand Up @@ -343,7 +341,7 @@ async def wait_for_target_processed(
return

elapsed_time = asyncio.get_event_loop().time() - start_time
if elapsed_time > timeout_seconds: # pragma: no cover
if elapsed_time > timeout_seconds:
raise TargetProcessingTimeoutError

await asyncio.sleep(
Expand Down
6 changes: 2 additions & 4 deletions src/vws/vws.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ def make_request(
# The Vuforia API returns a 429 response with no JSON body.
raise TooManyRequestsError(response=response)

if (
response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR
): # pragma: no cover
if response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR:
raise ServerError(response=response)

result_code = string_field(
Expand Down Expand Up @@ -323,7 +321,7 @@ def wait_for_target_processed(
return

elapsed_time = time.monotonic() - start_time
if elapsed_time > timeout_seconds: # pragma: no cover
if elapsed_time > timeout_seconds:
raise TargetProcessingTimeoutError

time.sleep(seconds_between_requests)
Expand Down