/
lib
/
python3.9
/
site-packages
/
up2date_client
/
__pycache__
/
up file
home
a m��i 5 � @ s< d Z ddlZddlZddlZddlZddlmZmZ ddlm Z m Z zddlmZm Z W n" eyz ddlmZm Z Y n0 ddlZejddd�Zeed �s�eje_ejZd ddd ddddddddddg d�fd�Zg d�ZG dd� d�ZG dd� d�Zdd � Zd!d"� Zd#d$� Zd/d&d'�Zd0d(d)�Zd1d*d+�Zd2d-d.�Z dS )3zj This module includes the Config and Up2date Config classes use by the up2date agent to hold config info. � N)�idn_ascii_to_puny�idn_puny_to_unicode)�ustr�sstr)�urlsplit� urlunsplitzrhn-client-toolsT)�fallback�ugettext)zUse a HTTP Proxyr )zRemote server URLz)https://xmlrpc.cln.cloudlinux.com/XMLRPC/)z&Remote server URL for access over IPv6z.https://ipv6.xmlrpc.cln.cloudlinux.com/XMLRPC/)zMirror list URLz>https://repo.cloudlinux.com/cloudlinux/mirrorlists/cln-mirrors)z#Whether or not debugging is enabledr )zLocation of system idz/etc/sysconfig/rhn/systemid)z4Override the automatically determined system version� )z;HTTP proxy in host:port format, e.g. squid.example.com:3128r )z'The username for an authenticated proxyr )z.The password to use for an authenticated proxyr )z$To use an authenticated proxy or notr )zBNumber of attempts to make at network connections before giving up� )z)The CA cert used to verify the ssl serverz'/usr/share/rhn/CLN-ORG-TRUSTED-SSL-CERTzDConfig options that can not be overwritten by a config update action)� sslCACert� serverURL�disallowConfChanges)ZenableProxyr � serverURLipv6Z mirrorURL�debug�systemIdPathZversionOverride� httpProxy� proxyUser� proxyPasswordZenableProxyAuthZnetworkRetriesr r )r r ZtmpDirc @ sl e Zd ZdZddd�Zddd�Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� ZdS )� ConfigFilez;class for handling persistent config options for the clientNc C s i | _ || _| jr| �� d S �N)�dict�fileName�load��self�filename� r �9/usr/lib/python3.9/site-packages/up2date_client/config.py�__init__B s zConfigFile.__init__c C s� |r || _ | j d u rd S t�| j tj�s,d S t| j d�}d}|�� D �]�}|�d�dkrZqD||�� }|slqD|d dkr�|d d� �� }qDnd}|�dd�}t |�d kr�qD|d �� }t |d �� �}d }|�d �} | dkr�|d | � }|}d }|�rr|�d�} |dv �rt|�t �� ��}nTt | �dk�rPzt|�}W n t�yL Y n0 n"| d dk�rdg }nd d� | D �}||f}|| jv �r�| j| }|d u�r�||d f}|d u�r�|d |f}|| j|<