a mi 5 @ s< d Z ddlZddlZddlZddlZddlmZmZ ddlm Z m Z zddlmZm Z W n" eyz ddlmZm Z Y n0 ddlZejdddZeed seje_ejZd ddd ddddddddddg dfdZg dZG dd dZG dd dZdd 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_punyidn_puny_to_unicode)ustrsstr)urlsplit urlunsplitzrhn-client-toolsT)fallbackugettext)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 serverURLdisallowConfChanges)ZenableProxyr serverURLipv6Z mirrorURLdebugsystemIdPathZversionOverride httpProxy proxyUser proxyPasswordZenableProxyAuthZnetworkRetriesr r )r r ZtmpDirc @ sl e Zd ZdZdddZdddZdd 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)dictfileNameloadselffilename 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 tjs,d S t| j d}d}| D ]}|ddkrZqD|| }|slqD|d dkr|d d }qDnd}|dd}t |d krqD|d }t |d }d }|d } | dkr|d | }|}d }|rr|d} |dv rt|t }nTt | dkrPzt|}W n tyL Y n0 n"| d dkrdg }nd d | D }||f}|| jv r| j| }|d ur||d f}|d ur|d |f}|| j|<