def pcl_put(options, source, target):
"""
?????????? ?????????? ??????? ???????? ????? ? ????????? (pcl_put_retry)
"""
pcl_verbose("Transfer: {0} ({1}) -> {2}".format(source, pcl_human(os.path.getsize(source)), target), options.verbose)
retry = 0
while True:
try:
pcl_put_retry(options, source, target)
break
except (pclURLError, pclBadStatusLine, pclCannotSendRequest, ssl.SSLError, socket.error, pclError) as e:
pcl_can_query_retry(e)
retry += 1
pcl_debug("Retry {0}/{1}: {2}".format(retry, options.retries, e), options.debug)
if retry >= options.retries:
raise pclError(1, e)
time.sleep(options.delay)
评论列表
文章目录