コード例 #1
0
ファイル: tui.py プロジェクト: xkollar/spacewalk
                                             self.tui.productInfo)
                except up2dateErrors.CommunicationError, e:
                    FatalErrorWindow(
                        self.screen,
                        _("Problem registering personal information:\n") +
                        e.errmsg)
                except:
                    print sys.exc_info()
                    print sys.exc_type

                    FatalErrorWindow(
                        self.screen,
                        _("Problem registering personal information"))

            else:
                rhnreg.registerProduct(systemId, self.tui.productInfo,
                                       self.tui.oemInfo)
                try:
                    rhnreg.registerProduct(systemId, self.tui.productInfo,
                                           self.tui.oemInfo)
                except up2dateErrors.CommunicationError, e:
                    FatalErrorWindow(
                        self.screen,
                        _("Problem registering personal information:\n") +
                        e.errmsg)
                except:
                    log.log_exception(*sys.exc_info())
                    FatalErrorWindow(
                        self.screen,
                        _("Problem registering personal information"))

        self.setScale(2, 4)
コード例 #2
0
ファイル: tui.py プロジェクト: flavio/spacewalk
        if ( not self.tui.alreadyRegistered ) or ( len(self.oemInfo)):
            # send product registration information
            if rhnreg.cfg['supportsUpdateContactInfo']:
                try:
                    rhnreg.updateContactInfo(self.tui.userName, self.tui.password,  self.tui.productInfo)
                except up2dateErrors.CommunicationError, e:
                    FatalErrorWindow(self.screen, _("Problem registering personal information:\n") + e.errmsg)
                except:
                    print sys.exc_info()
                    print sys.exc_type

                    FatalErrorWindow(self.screen,
                                     _("Problem registering personal information"))

            else:
                rhnreg.registerProduct(systemId, self.tui.productInfo,self.tui.oemInfo)
                try:
                    rhnreg.registerProduct(systemId, self.tui.productInfo,self.tui.oemInfo)
                except up2dateErrors.CommunicationError, e:
                    FatalErrorWindow(self.screen,
                                     _("Problem registering personal information:\n") +
                                     e.errmsg)
                except:
                    log.log_exception(*sys.exc_info())
                    FatalErrorWindow(self.screen, _("Problem registering personal information"))

        self.setScale(2, 4)

        # maybe upload hardware profile
        if self.tui.includeHardware:
            try: