def retry_if_io_error(exception):
"""Return True if IOError.
Return True if we should retry (in this case when it's an IOError),
False otherwise.
"""
print "Filesystem error, retrying in 2 seconds..."
return isinstance(exception, IOError)
评论列表
文章目录