Ejemplo n.º 1
0
 def _perform_unregister(self):
     try:
         managerlib.unregister(self.backend.cp_provider.get_consumer_auth_cp(), self.identity.uuid)
     except Exception, e:
         log.error("Error unregistering system with entitlement platform.")
         handle_gui_exception(e, _("<b>Errors were encountered during unregister.</b>") +
                                   "\n%s\n" +
                                   _("Please see /var/log/rhsm/rhsm.log for more information."),
                             self.main_window,
                             log_msg="Consumer may need to be manually cleaned up: %s" %
                             self.identity.uuid)
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
    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