def __init__(self, screen, test): self.screen = screen self.test = test self.size = snack._snack.size() self.drawFrame() self.alreadyRegistered = 0 try: self.serverType = rhnreg.getServerType() except up2dateErrors.InvalidProtocolError: FatalErrorWindow(screen, _("You specified an invalid protocol." + "Only https and http are allowed.")) self.windows = [ AlreadyRegisteredSubscriptionManagerWindow, AlreadyRegisteredWindow, StartWindow, SatelliteUrlWindow, ConnectWindow, InfoWindow, OSReleaseWindow, HardwareWindow, PackagesWindow, SendWindow, SendingWindow, ReviewWindow, FinishWindow ] self.serverURL = config.getServerlURL()[0] if not cfg['sslCACert']: cfg.set('sslCACert', '/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT') self.sslCACert = cfg['sslCACert']
def __init__(self, screen, test): self.screen = screen self.test = test self.size = snack._snack.size() self.drawFrame() self.alreadyRegistered = 0 try: self.serverType = rhnreg.getServerType() except up2dateErrors.InvalidProtocolError: FatalErrorWindow( screen, _("You specified an invalid protocol." + "Only https and http are allowed.")) self.windows = [ AlreadyRegisteredSubscriptionManagerWindow, AlreadyRegisteredWindow, StartWindow, SatelliteUrlWindow, ConnectWindow, InfoWindow, OSReleaseWindow, HardwareWindow, PackagesWindow, SendWindow, SendingWindow, ReviewWindow, FinishWindow ] self.serverURL = config.getServerlURL()[0] if not cfg['sslCACert']: cfg.set('sslCACert', '/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT') self.sslCACert = cfg['sslCACert']
def __init__(self, screen, test): self.screen = screen self.test = test self.size = snack._snack.size() self.drawFrame() self.alreadyRegistered = 0 try: self.serverType = rhnreg.getServerType() except up2dateErrors.InvalidProtocolError: FatalErrorWindow(screen, _("You specified an invalid protocol." + "Only https and http are allowed.")) self.windows = [ AlreadyRegisteredWindow, ConnectWindow, StartWindow, InfoWindow, OSReleaseWindow, HardwareWindow, PackagesWindow, SendWindow, SendingWindow, ReviewWindow, FinishWindow ] # if serverUrl is a list in the config, only reference the first one # when we need it if type(cfg['serverURL']) == type([]): self.serverURL = cfg['serverURL'][0] else: self.serverURL = cfg['serverURL'] if not cfg['sslCACert']: # Always use the path from the cert if available, else set to # default location if self.serverType == "hosted": cfg.set('sslCACert', '/usr/share/rhn/RHNS-CA-CERT') else: cfg.set('sslCACert', '/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT')