download.py 文件源码

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

项目:pyload-requests 作者: pyload 项目源码 文件源码
def close(self):
        """
        Cleanup.
        """
        for chunk in self.chunks:
            self.close_chunk(chunk)

        # Workaround: pycurl segfaults when closing multi, that never had
        # any curl handles
        if hasattr(self, 'manager'):
            with closing(pycurl.Curl()) as c:
                self.__manager.add_handle(c)
                self.__manager.remove_handle(c)

        self.chunks = []
        if hasattr(self, 'manager'):
            self.__manager.close()
            del self.__manager
        if hasattr(self, "info"):
            del self.info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号