diff --git a/backend/SystemUpdater/UpdateManagerDbus.py b/backend/SystemUpdater/UpdateManagerDbus.py index 22879d3..6eaa99e 100755 --- a/backend/SystemUpdater/UpdateManagerDbus.py +++ b/backend/SystemUpdater/UpdateManagerDbus.py @@ -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):