application.py 文件源码

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

项目:x-mario-center 作者: fossasia 项目源码 文件源码
def _gio_screenshots_json_download_complete_cb(self, source, result, path):
        try:
            res, content, etag = source.load_contents_finish(result)
        except GObject.GError:
            # ignore read errors, most likely transient
            return
        if content is not None:
            try:
                content = json.loads(content)
            except ValueError as e:
                LOG.error("can not decode: '%s' (%s)" % (content, e))
                content = None

        if isinstance(content, dict):
            # a list of screenshots as listsed online
            screenshot_list = content['screenshots']
        else:
            # fallback to a list of screenshots as supplied by the axi
            screenshot_list = []

        # save for later and emit
        self._screenshot_list = self._sort_screenshots_by_best_version(
            screenshot_list)
        self.emit("screenshots-available", self._screenshot_list)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号