summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorClay Gerrard <clay.gerrard@gmail.com>2022-08-10 12:38:54 -0500
committerTim Burke <tim.burke@gmail.com>2022-08-18 12:14:04 -0700
commit653cbcb686fc34cc28f9c7889e8746e77b95371a (patch)
treedcaaeb0596aa7283b1863e77df3eeddfcb76530c /swiftclient
parenta1d2f31131d79d7c551dbac4fc1e9c4d177d2df5 (diff)
downloadpython-swiftclient-653cbcb686fc34cc28f9c7889e8746e77b95371a.tar.gz
Expand retry handling on ratelimit response
We have seen middlewares that return ratelimit responses as 498 or 429, so tolerate either. Closes-Bug: #1879572 Change-Id: I027222157f6c2ad7882a0508302c9de097baae4c
Diffstat (limited to 'swiftclient')
-rw-r--r--swiftclient/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index 8415db2..16bbba8 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -1833,7 +1833,7 @@ class Connection:
self.http_conn = None
elif 500 <= err.http_status <= 599:
pass
- elif self.retry_on_ratelimit and err.http_status == 498:
+ elif self.retry_on_ratelimit and err.http_status in (498, 429):
pass
else:
raise