逻辑修改

This commit is contained in:
wangsong 2021-10-27 11:36:18 +08:00
parent 578619d2b6
commit 9751045d43
3 changed files with 7 additions and 9 deletions

View File

@ -163,12 +163,10 @@ class UpdateManager():
def refresh_cache(self):
_success = True
header = None
desc = None
header = ''
desc = ''
try:
self.update_list = UpdateList()
#第一次进入 之后update不进入
if self.cache is None:
self.cache = MyCache(None)
else:

View File

@ -96,7 +96,11 @@ class UpdateManagerDbusController(dbus.service.Object):
def Quit(self, caller_name):
"""Request a shutdown of the daemon."""
self.CancelDownload()
unLockedEnableShutdown()
try:
logging.info("file unlocked")
unLockedEnableShutdown()
except:
logging.error("File lock release failure")
logging.info("Quitting was requested")
logging.debug("Quitting main loop...")
mainloop.quit()

View File

@ -25,10 +25,6 @@ FORMAT_DEBUG = '%(asctime)-15s %(levelname)s(%(filename)s:%(lineno)d):%(message)
def signal_handler_term(signal, frame):
# type: (int, object) -> None
try:
logging.info("SIGTERM received,file unlocked")
except:
logging.error("File lock release failure")
logging.warning("SIGTERM received, will stop")
app.dbusController.Quit(None)