Skip to content

Commit dcc0da4

Browse files
committed
feat: no raise error if regions cache shrink failed
1 parent 166be8f commit dcc0da4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qiniu/http/regions_provider.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,10 @@ def __init__(
540540

541541
def __iter__(self):
542542
if self.__should_shrink:
543-
self.__shrink_cache()
543+
try:
544+
self.__shrink_cache()
545+
except Exception as err:
546+
logging.warning('failed to shrink cache', err)
544547

545548
get_regions_fns = [
546549
self.__get_regions_from_memo,

0 commit comments

Comments
 (0)