逻辑修改
This commit is contained in:
parent
578619d2b6
commit
9751045d43
|
@ -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:
|
||||
|
|
|
@ -96,7 +96,11 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
def Quit(self, caller_name):
|
||||
"""Request a shutdown of the daemon."""
|
||||
self.CancelDownload()
|
||||
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()
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue