google.py 文件源码

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

项目:download-manager 作者: thispc 项目源码 文件源码
def do_open(self, flags):
        # If we already loaded the data, don't bother loading it again
        if self.loaded:
            self.flags = flags
            return

        item = self.cache.get_by_key_name(self.namespace)

        if not item:
            self._is_new = True
            self.hash = {}
        else:
            self._is_new = False
            try:
                self.hash = cPickle.loads(str(item.data))
            except (IOError, OSError, EOFError, cPickle.PickleError):
                if self.log_debug:
                    log.debug("Couln't load pickle data, creating new storage")
                self.hash = {}
                self._is_new = True
        self.flags = flags
        self.loaded = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号