HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //proc/self/root/lib/python3.9/site-packages/dnf/conf/__pycache__/read.cpython-39.pyc
a

�!c��@s~ddlmZddlmZddlmZmZddlZddlZ	ddl
ZddlZddlZddl
Z
ddlZe
�d�ZGdd�de�ZdS)�)�absolute_import)�unicode_literals)�_�ucdN�dnfc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
RepoReadercCs||_||_dS)N)�conf�opts)�selfrr	�r�1/usr/lib/python3.9/site-packages/dnf/conf/read.py�__init__$szRepoReader.__init__c	cs�|�|jj�D]
}|Vqg}|jjD](}t�tj�|d��D]}|�|�q>q&|j	dd�d�|D]F}z|�|�D]
}|VqtWqdt
jjy�t
�td�|�Yqd0qddS)Nz*.repocSstj�|dd��S)N���)r�utilZ
split_path)�xrrr�<lambda>5�z%RepoReader.__iter__.<locals>.<lambda>)�keyz'Warning: failed loading '%s', skipping.)�
_get_reposrZconfig_file_path�reposdir�glob�os�path�join�append�sortr�
exceptions�ConfigError�logger�warningr)r
�rZrepo_configsrr�repofnrrr�__iter__(s
�zRepoReader.__iter__c	
Cs`tjj�||jj�}tj�|�}|durl||krJtd��	|||||�}ntd��	||||�}tj
�|��tj�||j�}z|�
|||tjj�Wn\ty�}zD||kr�td��	|||�}ntd��	||�}tj
�|��WYd}~n
d}~00|�d�tjjk�r:||k�r"td��	||�}ntd��	|�}t�|�t|j�|_|j�|jj�||_|S)	z)Build a repository using the parsed data.Nz&Bad id for repo: {} ({}), byte = {} {}z!Bad id for repo: {}, byte = {} {}z.Repository '{}' ({}): Error parsing config: {}z)Repository '{}': Error parsing config: {}�namez@Repository '{}' ({}) is missing name in configuration, using id.z;Repository '{}' is missing name in configuration, using id.)�libdnfr�ConfigParserZ
substitute�
substitutionsr�repoZrepo_id_invalidr�formatrrZRepoZ	_populateZPRIO_REPOCONFIG�
ValueErrorZ
_get_priorityZPRIO_DEFAULTrrrr#Z_substitutions�updateZcfg)	r
�parserZid_r!Zsubstituted_idZinvalid�msgr'�errr�_build_repo?s>�
�"
�
zRepoReader._build_repoccs(|jj}tj��}|�|�z|�|�Wnhtyf}z$tj�	t
d��||���WYd}~n6d}~0ty�}zt
�|�WYd}~n
d}~00|��D]�}|dkr�q�z|�|t|�|�}WnHtjjtjj	f�y}z"t
�|�WYd}~q�WYd}~nd}~00||_|�|j�|Vq�dS)z4Parse and yield all repositories from a config file.zParsing file "{}" failed: {}N�main)rr&r$r%ZsetSubstitutions�read�RuntimeErrorrrrrr(�IOErrorrrZgetDatar.rZ	RepoErrorZrepofileZ_configure_from_optionsr	)r
r!Zsubstsr+r-�sectionZthisreporrrrhs(

, 
"zRepoReader._get_reposN)�__name__�
__module__�__qualname__r
r"r.rrrrrr#s)r)Z
__future__rrZdnf.i18nrrZdnf.confrZlibdnf.confr$Zdnf.exceptionsZdnf.reporZloggingrZ	getLoggerr�objectrrrrr�<module>s