增加接口for插件:设置自动更新的时间
This commit is contained in:
parent
b9afec468a
commit
93fccf4d90
|
@ -23,3 +23,4 @@ plugin/moc*
|
|||
plugin/.qmake.stash
|
||||
plugin/Makefile
|
||||
backend/po/kylin-system-updater.pot
|
||||
plugin/upgrade.pro.user
|
||||
|
|
|
@ -355,6 +355,16 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
logging.error(str(e))
|
||||
return False,str(e)
|
||||
return True,"success"
|
||||
|
||||
# 设置自动更新时间
|
||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='s', out_signature='bs')
|
||||
def SetAutoUpgradePeriod(self, period):
|
||||
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' SetAutoUpgradePeriod will be set value %s.'%(period))
|
||||
try:
|
||||
self.parent.sqlite3_server.insert_into_display("update_period", period.lower())
|
||||
except Exception as e:
|
||||
logging.error(str(e))
|
||||
return True,"success"
|
||||
|
||||
# # dbus接口:改变apt下载速度
|
||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb', out_signature='s')
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue