代码逻辑调整

This commit is contained in:
wangsong 2021-10-11 17:19:44 +08:00
parent f1b49646a4
commit 2689ba47d9
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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: 需要处理返回结果 转化成中文