调整部分逻辑

This commit is contained in:
wangsong 2021-11-24 14:09:08 +08:00
parent dd18785a13
commit a434a37b00
1 changed files with 3 additions and 4 deletions

View File

@ -77,8 +77,8 @@ class UpdateManagerDbusController(dbus.service.Object):
#重启aptdeamon后台服务
def make_aptdeamon_restart(self):
header = None
desc = None
header = ''
desc = ''
try:
obj = self.bus.get_object('org.debian.apt', '/org/debian/apt')
@ -86,8 +86,7 @@ class UpdateManagerDbusController(dbus.service.Object):
retval = interface.Quit()
except Exception as e:
header = _("aptdeamon restart occur Exception")
desc = str(e)
logging.error(header + desc)
logging.error(str(e))
return False,header,desc
def check_connectivity(self):