本文整理匯總了Python中kimchi.swupdate.SoftwareUpdate.getUpdates方法的典型用法代碼示例。如果您正苦於以下問題:Python SoftwareUpdate.getUpdates方法的具體用法?Python SoftwareUpdate.getUpdates怎麽用?Python SoftwareUpdate.getUpdates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kimchi.swupdate.SoftwareUpdate
的用法示例。
在下文中一共展示了SoftwareUpdate.getUpdates方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: PackagesUpdateModel
# 需要導入模塊: from kimchi.swupdate import SoftwareUpdate [as 別名]
# 或者: from kimchi.swupdate.SoftwareUpdate import getUpdates [as 別名]
class PackagesUpdateModel(object):
def __init__(self, **kargs):
try:
self.host_swupdate = SoftwareUpdate()
except:
self.host_swupdate = None
def get_list(self):
if self.host_swupdate is None:
raise OperationFailed('KCHPKGUPD0004E')
return self.host_swupdate.getUpdates()
示例2: PackagesUpdateModel
# 需要導入模塊: from kimchi.swupdate import SoftwareUpdate [as 別名]
# 或者: from kimchi.swupdate.SoftwareUpdate import getUpdates [as 別名]
class PackagesUpdateModel(object):
def __init__(self, **kargs):
try:
self.host_swupdate = SoftwareUpdate()
except:
self.host_swupdate = None
self.objstore = kargs["objstore"]
self.task = TaskModel(**kargs)
def get_list(self):
if self.host_swupdate is None:
raise OperationFailed("KCHPKGUPD0004E")
return self.host_swupdate.getUpdates()