HEX
Server: LiteSpeed
System: Linux us-phx-web629.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User: u756937133 (756937133)
PHP: 8.2.30
Disabled: passthru,chgrp
Upload Files
File: //lib/python3.9/site-packages/up2date_client/__pycache__/rhnChannel.cpython-39.pyc
a

��bg��@s�ddlmZddlmZddlmZddlmZddlZejddd�Zeed	�sXeje_	ej	Z
Gd
d�d�ZGdd
�d
�Zddd�Z
gZdaddd�Zdd�Zdd�Zdd�ZdS)�)�up2dateAuth)�
up2dateErrors)�config)�	rhnserverNzrhn-client-toolsT)�fallback�ugettextc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�
rhnChannelcKs&i|_|��D]}|||j|<qdS�N��dict�keys)�self�kwargs�kw�r�=/usr/lib/python3.9/site-packages/up2date_client/rhnChannel.py�__init__szrhnChannel.__init__cCs
|j|Sr	�r)r
�itemrrr�__getitem__szrhnChannel.__getitem__cCs||j|<dSr	r)r
r�valuerrr�__setitem__szrhnChannel.__setitem__cCs|jd|jdkS)N�namer)r
�otherrrr�__lt__ szrhnChannel.__lt__cCs
|j��Sr	r
�r
rrrr#szrhnChannel.keyscCs
|j��Sr	)r�valuesrrrrr&szrhnChannel.valuescCs
|j��Sr	)r�itemsrrrrr)szrhnChannel.itemsN)
�__name__�
__module__�__qualname__rrrrrrrrrrrrsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�rhnChannelListcCs
g|_dSr	��listrrrrr-szrhnChannelList.__init__cCs|j�|�dSr	�r#�append)r
�channelrrr�
addChannel2szrhnChannelList.addChannelcCs|jSr	r"rrrr�channels6szrhnChannelList.channelscCs$|jD]}|d|kr|SqdS)N�labelr")r
�channelnamer&rrr�
getByLabel9s
zrhnChannelList.getByLabelcCs
|�|�Sr	)r+)r
r*rrr�	getByName=szrhnChannelList.getByNamecCs*g}|jD]}|d|kr
|�|�q
|S)N�typer$)r
r-r(r&rrr�	getByType@s

zrhnChannelList.getByTypeN)	rrr rr'r(r+r,r.rrrrr!,sr!cCs`g}t|d�}|��D]D}|ddkrP|d|d<d|d|d|df|d<|�|�q|S)	N��timeoutr-�up2dater)rz%s channel %s from  %s�url�description)�getChannelsr(r%)r0r(ZsourceChannelsZ
sourceChannelrrr�getChannelDetailsJs
�
r5c	Cs�t��}ts�|s�t�atj|d�}t��s8t�	t
d���|j�t���}|D]`}|rb|d|vrbqLt
dt��d�}|��D]&}|dkr�|d|d<qz||||<qzt�|�qLttj�dkr�t�t
d	���tS)
zG return rhnChannelList containing list of channel we are subscribed to r/zUnable to Locate SystemIdr)r1)r-r2Z
last_modified�versionrzEThis system may not be updated until it is associated with a channel.)rZinitUp2dateConfig�selected_channelsr!r�	RhnServerr�getSystemIdrZNoSystemIdError�_r1ZlistChannelsrZgetServerlURLFromMirrorrr'�lenr#ZNoChannelsError)	�force�label_whitelistr0Zcfg�sZup2dateChannelsZchanr&�keyrrrr4]s&r4cCs dattdd�|��}t|d�S)NcSs|dfS)N�r)�xrrr�<lambda>�zsetChannels.<locals>.<lambda>)r=)r7r�mapr4)ZtempchannelsZ	whitelistrrr�setChannels|srEcCst��}|j�t��|||�Sr	)rr8r1�subscribeChannelsrr9�r(�username�passwdr>rrrrF�s�rFcCst��}|j�t��|||�Sr	)rr8r1�unsubscribeChannelsrr9rGrrrrJ�s�rJ)N)NNN)Zup2date_clientrrrr�gettext�translation�t�hasattrrr:rr!r5Zcmdline_pkgsr7r4rErFrJrrrr�<module>s"