当前位置: 首页>>代码示例>>Python>>正文


Python ConsumerIdentity.exists方法代码示例

本文整理汇总了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
开发者ID:tkolhar,项目名称:subscription-manager,代码行数:15,代码来源:rhsm_login.py

示例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
开发者ID:bkearney,项目名称:subscription-manager,代码行数:17,代码来源:rhsm_login.py


注:本文中的subscription_manager.certlib.ConsumerIdentity.exists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。