本文整理汇总了Python中subscription_manager.certlib.ConsumerIdentity.exists方法的典型用法代码示例。如果您正苦于以下问题:Python ConsumerIdentity.exists方法的具体用法?Python ConsumerIdentity.exists怎么用?Python ConsumerIdentity.exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscription_manager.certlib.ConsumerIdentity
的用法示例。
在下文中一共展示了ConsumerIdentity.exists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pre
# 需要导入模块: from subscription_manager.certlib import ConsumerIdentity [as 别名]
# 或者: from subscription_manager.certlib.ConsumerIdentity import exists [as 别名]
def pre(self):
# Because the RHN client tools check if certs exist and bypass our
# firstboot module if so, we know that if we reach this point and
# identity certs exist, someone must have hit the back button.
# TODO: i'd like this call to be inside the async progress stuff,
# since it does take some time
if ConsumerIdentity.exists():
try:
managerlib.unregister(self._parent.backend.cp_provider.get_consumer_auth_cp(),
self._parent.identity.uuid)
except socket.error, e:
handle_gui_exception(e, e, self._parent.window)
self._parent._registration_finished = False
示例2: initializeUI
# 需要导入模块: from subscription_manager.certlib import ConsumerIdentity [as 别名]
# 或者: from subscription_manager.certlib.ConsumerIdentity import exists [as 别名]
def initializeUI(self):
# Need to make sure that each time the UI is initialized we reset back
# to the main register screen.
# if they've already registered during firstboot and have clicked
# back to register again, we must first unregister.
# XXX i'd like this call to be inside the async progress stuff,
# since it does take some time
if self._registration_finished and ConsumerIdentity.exists():
try:
managerlib.unregister(self.backend.uep, self.consumer.uuid)
except socket.error, e:
handle_gui_exception(e, e, self.registerWin)
self.consumer.reload()
self._registration_finished = False