diff --git a/backend/SystemUpdater/Core/utils.py b/backend/SystemUpdater/Core/utils.py index a2dc3b0..2875f7d 100644 --- a/backend/SystemUpdater/Core/utils.py +++ b/backend/SystemUpdater/Core/utils.py @@ -468,7 +468,7 @@ def get_config_patch(): if os.path.exists(NOW_UPDATE_CONFIG): return NOW_UPDATE_CONFIG elif os.path.exists(OLD_UPDATE_CONFIG): - return OLD_UPDATE_CONFIG + return NOW_UPDATE_CONFIG else: return NOW_UPDATE_CONFIG diff --git a/backend/SystemUpdater/backend/__init__.py b/backend/SystemUpdater/backend/__init__.py index 5dae6cd..22bd9dd 100644 --- a/backend/SystemUpdater/backend/__init__.py +++ b/backend/SystemUpdater/backend/__init__.py @@ -667,6 +667,7 @@ class InstallBackend(): #升级完成后走的分支 if action == self.ACTION_INSTALL: + false_num = 0 self._release_install_lock() self._send_error_code(error_code) @@ -680,8 +681,10 @@ class InstallBackend(): self.window_main.start_install(self.action_mode,True,self.now_upgrade.upgrade_content) self.window_main.retry_limit = self.window_main.retry_limit - 1 return - - false_num = self._make_insert_info(success,is_cancelled,self.now_upgrade,error_string,error_desc) + try: + false_num = self._make_insert_info(success,is_cancelled,self.now_upgrade,error_string,error_desc) + except Exception as e: + logging.error(e) if success == False: logging.info("The number of failed installations or upgrades is %d",false_num)