HEX
Server: Apache
System: Linux a16-asgard6.hospedagemuolhost.com.br 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: maoristu4c3dbd03 (1436)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/up2date_client/__pycache__/rhnChannel.cpython-39.pyc
a

c8h��@s�ddlmZddlmZddlmZddlmZddlmZddlZejddd	�Ze	ed
�sdeje_
ej
ZGdd�d�ZGd
d�d�Z
ddd�ZgZdaddd�Zdd�Zdd�Zdd�ZdS)�)�up2dateAuth)�
up2dateLog)�
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)rr�valuerrr�__setitem__szrhnChannel.__setitem__cCs|jd|jdkS)N�namer)r�otherrrr�__lt__!szrhnChannel.__lt__cCs
|j��Sr
r�rrrrr
$szrhnChannel.keyscCs
|j��Sr
)r�valuesrrrrr'szrhnChannel.valuescCs
|j��Sr
)r�itemsrrrrr*szrhnChannel.itemsN)
�__name__�
__module__�__qualname__rrrrr
rrrrrrr	sr	c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�rhnChannelListcCs
g|_dSr
��listrrrrr.szrhnChannelList.__init__cCs|j�|�dSr
�r$�append)r�channelrrr�
addChannel3szrhnChannelList.addChannelcCs|jSr
r#rrrr�channels7szrhnChannelList.channelscCs$|jD]}|d|kr|SqdS)N�labelr#)r�channelnamer'rrr�
getByLabel:s
zrhnChannelList.getByLabelcCs
|�|�Sr
)r,)rr+rrr�	getByName>szrhnChannelList.getByNamecCs*g}|jD]}|d|kr
|�|�q
|S)N�typer%)rr.r)r'rrr�	getByTypeAs

zrhnChannelList.getByTypeN)	rr r!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&)r1r)ZsourceChannelsZ
sourceChannelrrr�getChannelDetailsKs
�
r6c
Cs0t��}t��}t�s|�st�atj|d�}t�	�sDt
�td���|j
�t�	��}|D]�}|rn|d|vrnqXtdt��d�}|��D]&}	|	dkr�|d|d<q�||	||	<q�|d�r|d|d	<|d<|d
<|d<|�d|d	�|�d
�|�d�t�|�qXttj�dk�r,t
�td���tS)zG return rhnChannelList containing list of channel we are subscribed to r0zUnable to Locate SystemIdr*r2)r.r3Z
last_modified�versionZchannelOverriderr4Zsummaryz'WARNING: Channel overridden locally: %sz=-------: If you see this warning outside of the leapp processz$-------: contact CloudLinux support.rzEThis system may not be updated until it is associated with a channel.)rZinitUp2dateConfigrZinitLog�selected_channelsr"r�	RhnServerr�getSystemIdrZNoSystemIdError�_r2ZlistChannelsr	ZgetServerlURLFromMirrorr
Zlog_mer(�lenr$ZNoChannelsError)
�force�label_whitelistr1Zcfg�log�sZup2dateChannelsZchanr'�keyrrrr5^s8
�

r5cCs dattdd�|��}t|d�S)NcSs|dfS)N�r)�xrrr�<lambda>��zsetChannels.<locals>.<lambda>)r>)r8r�mapr5)ZtempchannelsZ	whitelistrrr�setChannels�srGcCst��}|j�t��|||�Sr
)rr9r2�subscribeChannelsrr:�r)�username�passwdr@rrrrH�s�rHcCst��}|j�t��|||�Sr
)rr9r2�unsubscribeChannelsrr:rIrrrrL�s�rL)N)NNN)Zup2date_clientrrrrr�gettext�translation�t�hasattrrr;r	r"r6Zcmdline_pkgsr8r5rGrHrLrrrr�<module>s$


(