写入配置文件时 重新读取再写入

This commit is contained in:
wangsong 2022-06-29 02:34:58 +08:00
parent a9786e4928
commit 9c08129778
3 changed files with 4 additions and 5 deletions

View File

@ -32,8 +32,9 @@ class UpgradeConfig(SafeConfigParser):
def setValue(self, section, option, value=None,is_write = True):
if option != 'upgradelist':
logging.info("SetValue Section:%s Option:%s Value:%s",section, option, value)
try:
self.reReadConfigFiles()
self.set(section, option,value)
except Exception as e:
logging.error("Error: setValue section:%s option:%s value:%s",section, option, value)

View File

@ -325,8 +325,7 @@ class InstallBackendAptdaemon(InstallBackend):
if progress > 51 and progress < 90 and self.on_install_stage == False:
logging.info("The process is now in the installtion phase")
self.on_install_stage = True
if self.action_mode != self.MODE_INSTALL_SINGLE:
self._start_install_lock()
self._start_install_lock()
#只处理从下载切换到安装时出现的网络问题
#当网络波动时下载某些软件包失败时属于异常状态进行重试时 不发送后续进度 等待重试正常是 进行下载安装

View File

@ -566,8 +566,7 @@ class InstallBackend():
#升级完成后走的分支
if action == self.ACTION_INSTALL:
if self.action_mode != self.MODE_INSTALL_SINGLE:
self._release_install_lock()
self._release_install_lock()
self._send_error_code(error_code)
if self.action_mode == self.MODE_INSTALL_SINGLE: