代码逻辑调整
This commit is contained in:
parent
f1b49646a4
commit
2689ba47d9
|
@ -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)
|
||||
|
|
|
@ -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: 需要处理返回结果 转化成中文
|
||||
|
|
Loading…
Reference in New Issue