去除无用接口
This commit is contained in:
parent
ae90e8ea46
commit
f94165c962
|
@ -204,25 +204,16 @@ class UpdateManagerDbusController(dbus.service.Object):
|
||||||
logging.error(False, str(e))
|
logging.error(False, str(e))
|
||||||
return (False, str(e))
|
return (False, str(e))
|
||||||
|
|
||||||
# # 操作数据库的接口
|
|
||||||
# @dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='b')
|
|
||||||
# def DataBaseOpt(self, action='check',table='', cid=19):
|
|
||||||
# if action == 'check':
|
|
||||||
# try:
|
|
||||||
# self.parent.sqlite3_server.find_msg_from_datebase(action, table, cid)
|
|
||||||
# except Exception as e:
|
|
||||||
# logging.error(str(e))
|
|
||||||
# return False
|
|
||||||
# return True
|
|
||||||
|
|
||||||
# dbus接口:向数据库display表中插入数据
|
# dbus接口:向数据库display表中插入数据
|
||||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='ss', sender_keyword='sender')
|
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='ss', sender_keyword='sender')
|
||||||
def InsertInstallState(self, item, value, sender=None):
|
def InsertInstallState(self, item, value, sender=None):
|
||||||
try:
|
try:
|
||||||
self.parent.sqlite3_server.insert_into_display(item, value)
|
self.parent.sqlite3_server.insert_into_display(item, value)
|
||||||
logging.info("Database inserted successfully,options:%s,value:%s" % (item, value))
|
logging.info("Database inserted successfully,options:%s,value:%s" % (item, value))
|
||||||
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Database insert failed,options:%s,value:%s" % (item, value))
|
logging.error("Database insert failed,options:%s,value:%s" % (item, value))
|
||||||
|
return False
|
||||||
|
|
||||||
# # download certain package and its dependencies
|
# # download certain package and its dependencies
|
||||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='asi', out_signature='b')
|
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='asi', out_signature='b')
|
||||||
|
@ -238,9 +229,7 @@ class UpdateManagerDbusController(dbus.service.Object):
|
||||||
times -= 1
|
times -= 1
|
||||||
return True
|
return True
|
||||||
|
|
||||||
#
|
# # dbus接口:改变apt下载速度
|
||||||
# dbus接口:改变apt下载速度
|
|
||||||
#
|
|
||||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb')
|
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb')
|
||||||
def SetDownloadspeedMax(self, speed, set):
|
def SetDownloadspeedMax(self, speed, set):
|
||||||
if set:
|
if set:
|
||||||
|
@ -255,9 +244,7 @@ class UpdateManagerDbusController(dbus.service.Object):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#
|
# # dbus接口:获取apt下载速度
|
||||||
# dbus接口:获取apt下载速度
|
|
||||||
#
|
|
||||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='bs')
|
@dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='bs')
|
||||||
def GetDownloadspeedLimitValue(self):
|
def GetDownloadspeedLimitValue(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue