def pcl_can_query_retry(e):
"""
???????? ?????????? ??? ?????? pcl_query_retry ?? ??????????? ?????????? ???????
?????????:
e (Exception) -- ?????????? ?? pcl_query_retry
?????????:
None ??? ?????????????? ??????????
"""
if type(e) == pclError:
# https://docs.pcloud.com/errors/index.html
if e.errno >= 3000:
pass
# HTTP
elif (e.errno >= 500 and e.errno < 600) or e.errno == 401 or e.errno == 429:
pass
else:
raise e
elif type(e) == socket.error and not (e.errno == errno.ECONNRESET or e.errno == errno.ECONNREFUSED):
raise e
评论列表
文章目录