Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 14, 2024
1 parent 7892d02 commit ef19a91
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions easyverein/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import logging
from pathlib import Path
from typing import TYPE_CHECKING, Any, TypeVar
from time import sleep
from typing import TYPE_CHECKING, Any, TypeVar

import requests
from pydantic import BaseModel
Expand Down Expand Up @@ -123,9 +123,11 @@ def _do_request( # noqa: PLR0913
self.logger.warning("Sleeping %d seconds", retry_after)
sleep(retry_after)
if files:
for k,v in files:
for k, v in files:
v.seek(0)
return self._do_request(method, url, binary, data, headers, files, retry=False)
return self._do_request(
method, url, binary, data, headers, files, retry=False
)
else:
raise EasyvereinAPITooManyRetriesException(
f"Too many requests, please wait {retry_after} seconds and try again.",
Expand Down

0 comments on commit ef19a91

Please sign in to comment.