aptd.py 文件源码

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

项目:x-mario-center 作者: fossasia 项目源码 文件源码
def update_xapian_index(self):
        self._logger.debug("update_xapian_index")
        system_bus = get_dbus_bus()
        # axi is optional, so just do nothing if its not installed
        try:
            axi = dbus.Interface(
                system_bus.get_object("org.debian.AptXapianIndex", "/"),
                "org.debian.AptXapianIndex")
        except dbus.DBusException as e:
            self._logger.warning("axi can not be updated '%s'" % e)
            return
        axi.connect_to_signal("UpdateFinished", self._axi_finished)
        # we don't really care for updates at this point
        #axi.connect_to_signal("UpdateProgress", progress)
        try:
            # first arg is force, second update_only
            axi.update_async(True, False)
        except:
            self._logger.warning("could not update axi")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号