예제 #1
0
def getAvailableChannels(username, password):
    s = rhnserver.RhnServer()
    server_arch = up2dateUtils.getArch()
    server_version = up2dateUtils.getVersion()
    server_release = up2dateUtils.getRelease()

    availableChannels = None

    try:
        availableChannels = s.registration.available_eus_channels(
            username, password, server_arch, server_version, server_release)
    except xmlrpclib.Fault:
        f = sys.exc_info()[1]
        if f.faultCode == 99:
            raise_with_tb(up2dateErrors.DelayError(f.faultString))
        else:
            raise

    return availableChannels
예제 #2
0
파일: rhnreg.py 프로젝트: shastah/spacewalk
def getAvailableChannels(username, password):
    s = rhnserver.RhnServer()
    server_arch = up2dateUtils.getArch()
    server_version = up2dateUtils.getVersion()
    server_release = up2dateUtils.getRelease()

    availableChannels = None

    try:
        availableChannels = s.registration.available_eus_channels(
            username, password, server_arch, server_version, server_release
        )
    except xmlrpclib.Fault:
        f = sys.exc_info()[1]
        if f.faultCode == 99:
            raise_with_tb(up2dateErrors.DelayError(f.faultString))
        else:
            raise

    return availableChannels