3
0Q=jS; ã @ sB d Z ddlZddlZddlZddlZddlmZmZ ddlm Z m
Z
yddlmZm
Z
W n$ ek
r| ddlmZm
Z
Y nX ddlZejddd�Zeed ƒs¦eje_ejZd9d:d;dd?d@dAdBdCdDdEddd d!gfd"œZd#dd$gZG d%d&„ d&ƒZG d'd(„ d(ƒZd)d*„ Zd+d,„ Zd-d.„ ZdFd0d1„ZdGd2d3„ZdHd4d5„ZdId7d8„Z dS )Jzj
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)ZfallbackÚugettextúUse a HTTP ProxyúRemote server URLú)https://xmlrpc.cln.cloudlinux.com/XMLRPC/ú&Remote server URL for access over IPv6ú.https://ipv6.xmlrpc.cln.cloudlinux.com/XMLRPC/úMirror list URLú>https://repo.cloudlinux.com/cloudlinux/mirrorlists/cln-mirrorsú#Whether or not debugging is enabledúLocation of system idú/etc/sysconfig/rhn/systemidú4Override the automatically determined system versionÚ ú;HTTP proxy in host:port format, e.g. squid.example.com:3128ú'The username for an authenticated proxyú.The password to use for an authenticated proxyú$To use an authenticated proxy or notúBNumber of attempts to make at network connections before giving upé ú)The CA cert used to verify the ssl serverú'/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" 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| jƒ d S )N)ÚdictÚfileNameÚload)ÚselfÚfilename© r, ú/usr/lib/python3.6/config.pyÚ__init__B s zConfigFile.__init__c C sÜ |r
|| _ | j d krd S tj| j tjƒs,d S t| j dƒ}d}�x�|jƒ D �]‚}|jdƒdkr^qH||jƒ }|spqH|d dkr�|d d… jƒ }qHnd}|jddƒ}t |ƒdkr®qH|d jƒ }t
|d jƒ ƒ}d }|jd ƒ} | dkrô|d | … }|}d }|�rx|jd
ƒ}
|dk�r"t|jt
jƒ ƒƒ}nVt |
ƒdk�rVyt|ƒ}W n tk
�rR Y nX n"|
d dk�rjg }nd
d„ |
D ƒ}||f}|| jk�rÂ| j| }|d k �r¬||d f}|d k �rÂ|d |f}|| j|<