file_operations.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:diycrate 作者: jheld 项目源码 文件源码
def get_folder(client, folder_id):
        """

        :param client:
        :param folder_id:
        :return:
        """
        folder = None
        num_retry = 15
        for x in range(num_retry):
            try:
                folder = client.folder(folder_id=folder_id).get()
                break
            except (ConnectionError, BrokenPipeError, ProtocolError, ConnectionResetError, BoxAPIException):
                crate_logger.debug(traceback.format_exc())
                if x >= num_retry - 1:
                    crate_logger.debug('Failed for the last time to get the folder: {}'.format(folder_id))
        return folder
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号