diff --git a/SystemUpdater/Core/UpdateList.py b/SystemUpdater/Core/UpdateList.py index e31bbcb..8540895 100644 --- a/SystemUpdater/Core/UpdateList.py +++ b/SystemUpdater/Core/UpdateList.py @@ -30,7 +30,6 @@ import yaml import shutil import apt_pkg - OUTPUT_CONFIG_PATH = apt_pkg.config.find_dir("Kylin-system-updater::OutputConfigDir", '/var/lib/kylin-system-updater') @@ -45,10 +44,9 @@ class UpdateList(): def __init__(self, parent, dist=None): #所有的组升级安装列表 self.local_upgrade_list = {} - # a stable machine uniq id + #清空上次输出的分组JSON文件 def _empty_output_dir(self): - #4、 清空上次输出的分组JSON文件 try: if not os.path.exists(OUTPUT_CONFIG_PATH): os.makedirs(OUTPUT_CONFIG_PATH) diff --git a/SystemUpdater/UpdateManagerDbus.py b/SystemUpdater/UpdateManagerDbus.py index d63d9ae..1f89289 100755 --- a/SystemUpdater/UpdateManagerDbus.py +++ b/SystemUpdater/UpdateManagerDbus.py @@ -46,8 +46,10 @@ class UpdateManagerDbusController(dbus.service.Object): retval = interface.updateSourceTemplate() lock.release() except Exception as e: + header = _("update important list occur Exception") + desc = str(e) logging.error("update sourceTemplate Failed and Error mes:%s"%str(e)) - return False + return False,header,desc if retval == False: #FIXME: 需要处理返回结果 转化成中文