修改方法调用的打印日志

This commit is contained in:
wangsong 2021-11-17 14:43:01 +08:00
parent fa9daab59f
commit 1d1d216117
1 changed files with 5 additions and 4 deletions

View File

@ -63,6 +63,7 @@ class UpdateManagerDbusController(dbus.service.Object):
lock = threading.Lock() lock = threading.Lock()
bus = dbus.SystemBus() bus = dbus.SystemBus()
try: try:
logging.info("start to update Source Template...")
obj = bus.get_object('com.kylin.software.properties', '/com/kylin/software/properties') obj = bus.get_object('com.kylin.software.properties', '/com/kylin/software/properties')
interface = dbus.Interface(obj, dbus_interface='com.kylin.software.properties.interface') interface = dbus.Interface(obj, dbus_interface='com.kylin.software.properties.interface')
lock.acquire() lock.acquire()
@ -133,8 +134,8 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.warning('Clean In the process of updating or Upgrading...') logging.warning('Clean In the process of updating or Upgrading...')
return False,'In the process of updating or Upgrading...' return False,'In the process of updating or Upgrading...'
else: else:
self.parent.start_clean()
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' Clean ...') logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' Clean ...')
self.parent.start_clean()
return True return True
except Exception: except Exception:
return False return False
@ -158,8 +159,8 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.warning('FixBrokenDepends In the process of updating or Upgrading...') logging.warning('FixBrokenDepends In the process of updating or Upgrading...')
return False,'In the process of updating or Upgrading...' return False,'In the process of updating or Upgrading...'
else: else:
self.parent.start_fix_broken()
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' FixBrokenDepends ...') logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' FixBrokenDepends ...')
self.parent.start_fix_broken()
return True return True
except Exception: except Exception:
return False return False
@ -173,8 +174,8 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.warning('FixIncompleteInstall In the process of updating or Upgrading...') logging.warning('FixIncompleteInstall In the process of updating or Upgrading...')
return False,'In the process of updating or Upgrading...' return False,'In the process of updating or Upgrading...'
else: else:
self.parent.start_fix_incomplete()
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' FixIncompleteInstall ...') logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' FixIncompleteInstall ...')
self.parent.start_fix_incomplete()
return True return True
except Exception: except Exception:
return False return False
@ -188,8 +189,8 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.warning('UpdateDetect In the process of updating or Upgrading...') logging.warning('UpdateDetect In the process of updating or Upgrading...')
return False,'In the process of updating or Upgrading...' return False,'In the process of updating or Upgrading...'
else: else:
self.parent.start_update()
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' UpdateDetect ...') logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' UpdateDetect ...')
self.parent.start_update()
return True return True
except Exception: except Exception:
return False return False