Skip to content

Commit

Permalink
fix file seek reset on auto_retry
Browse files Browse the repository at this point in the history
  • Loading branch information
cod3monk committed Feb 17, 2024
1 parent d7b9beb commit 575f148
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion easyverein/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ def _do_request( # noqa: PLR0913
self.logger.warning("Retrying after %d seconds sleep.", retry_after)
sleep(retry_after)
if files:
for k, v in files:
for v in files.values():
v.seek(
0
) # reset file seek, as it has been moved by the previous call

return self._do_request(method, url, binary, data, headers, files)
else:
raise EasyvereinAPITooManyRetriesException(
Expand Down

0 comments on commit 575f148

Please sign in to comment.