From e29dc1e15e54079939895e74537e33cd4c1845ef Mon Sep 17 00:00:00 2001
From: Pawel Polewicz
Date: Thu, 31 Oct 2024 22:10:58 +0200
Subject: [PATCH 1/2] Add upload token reset after upload timeout
---
b2sdk/_internal/b2http.py | 2 ++
changelog.d/+17dd34ae.fixed.md | 1 +
2 files changed, 3 insertions(+)
create mode 100644 changelog.d/+17dd34ae.fixed.md
diff --git a/b2sdk/_internal/b2http.py b/b2sdk/_internal/b2http.py
index 0d0fe031..448b075c 100644
--- a/b2sdk/_internal/b2http.py
+++ b/b2sdk/_internal/b2http.py
@@ -551,6 +551,8 @@ def _translate_errors(cls, fcn, post_params=None):
# an upload request for cause, so we use a 400 Bad Request
# code.
raise BrokenPipe()
+ elif isinstance(e2, TimeoutError):
+ raise B2RequestTimeout(str(e0))
raise B2ConnectionError(str(e0))
except requests.Timeout as e:
diff --git a/changelog.d/+17dd34ae.fixed.md b/changelog.d/+17dd34ae.fixed.md
new file mode 100644
index 00000000..5f8683f2
--- /dev/null
+++ b/changelog.d/+17dd34ae.fixed.md
@@ -0,0 +1 @@
+Add upload token reset after upload timeout
From bcf467c10f47915a0f9aade9dbb4697cdafd1dc3 Mon Sep 17 00:00:00 2001
From: Pawel Polewicz
Date: Thu, 31 Oct 2024 22:40:17 +0200
Subject: [PATCH 2/2] Towncrier lint is not part of lint...
---
changelog.d/+17dd34ae.fixed.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/changelog.d/+17dd34ae.fixed.md b/changelog.d/+17dd34ae.fixed.md
index 5f8683f2..9a890007 100644
--- a/changelog.d/+17dd34ae.fixed.md
+++ b/changelog.d/+17dd34ae.fixed.md
@@ -1 +1 @@
-Add upload token reset after upload timeout
+Add upload token reset after upload timeout.