%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�|fB�	��ddlZddlZddlmZddlmZmZmZddlm	Z	ddl
mZddlm
Z
idd�d	d�d
d�dd�dd
�dd
�dd
�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�dddddddd��ZdZd Zd!Zd"d#gZd$d%gZedZd&ZGd'�d(e�Zy))�N)�gettext)�ShortcutHandler�ShortcutException�InvalidShortcutException)�SourcesListShortcutHandler)�URIShortcutHandler)�urlparse�folsom�precise�grizzly�havana�icehouse�juno�trusty�kilo�liberty�mitaka�newton�xenial�ocata�pike�queens�rocky�bionic�stein�train�ussuri�victoria�focal�jammy)�wallaby�xena�yoga�zed�antelope�bobcat�caracalzUbuntu Cloud Archivez.https://wiki.ubuntu.com/OpenStack/CloudArchivez0http://ubuntu-cloud.archive.canonical.com/ubuntuz
cloud-archive�uca�updates�proposedzubuntu-cloud-keyringc�h��eZdZ�fd�Zed��Zed��Zd�Zd
�fd�	Zd�Z	d�Z
d�Zd	�Z�xZ
S)�CloudArchiveShortcutHandlerc���tt|�
|fi|��d|_t	|j|�|j
|�|j|�f�std�|z}t|��|jj�|_d|jz|_|jj�|_|jtvr#td�|jz}t|��|jtvr#td�|jz}t|��t|j}t!|t#j$d�xs|f�}|j&|vrAtd�|jj)�|j)�fz}t|��t*�d|jj)���|_|jdk(r|xj,d	z
c_|j.st|j&�d
|j�d|j��}dj1|j2�xsd
}|j4�dt6�d|�d|��}|j9|�yy)Nz&not a valid cloud-archive format: '%s'zcloudarchive-%sz&not a valid cloud-archive pocket: '%s'znot a valid cloud-archive: '%s'�CA_ALLOW_CODENAMEz)cloud-archive for %s only supported on %sz for OpenStack r*z [proposed]�-�/� �main)�superr,�__init__�caname�any�
_match_uca�
_match_uri�_match_sourceslist�_r�lower�	_filebase�pocket�UCA_VALID_POCKETSr�RELEASE_MAP�set�os�getenv�codename�
capitalize�UCA�_description�
_source_entry�join�
components�binary_type�UCA_ARCHIVE�_set_source_entry)
�self�shortcut�kwargs�msgrC�
validnames�dist�comps�line�	__class__s
         ��A/usr/lib/python3/dist-packages/softwareproperties/cloudarchive.pyr4z$CloudArchiveShortcutHandler.__init__Is'���
�)�4�9�(�M�f�M�����D�O�O�H�-��O�O�H�-��+�+�H�5�7�8��=�>��I�C�*�3�/�/��k�k�'�'�)���*�T�[�[�8����k�k�'�'�)����{�{�/�/��=�>����L�C�#�C�(�(��{�{�k�)��6�7�$�+�+�E�C�#�C�(�(��t�{�{�+���(�B�I�I�.A�$B�$N�h�O�P�
��=�=�
�*��@�A��K�K�*�*�,�h�.A�.A�.C�D�E�C�#�C�(�(�"�e�?�4�;�;�3I�3I�3K�2L�M����;�;�*�$�����.���!�!��m�m�_�A�d�k�k�]�!�D�K�K�=�A�D��H�H�T�_�_�-�7��E��&�&�'�q��
�Q�t�f�A�e�W�E�D��"�"�4�(�	"�c��|jS�N)rF�rMs rV�descriptionz'CloudArchiveShortcutHandler.descriptionrs��� � � rWc��tSrY)�WEB_LINKrZs rV�web_linkz$CloudArchiveShortcutHandler.web_linkvs���rWc�\�tjdt��j�d��y)Nzapt-get install -y T)�check)�
subprocess�run�UCA_KEYRING_PACKAGE�splitrZs rV�add_keyz#CloudArchiveShortcutHandler.add_keyzs$�����,�-@�,A�B�H�H�J�RV�WrWc�(��tt|��SrY)r3r,�_encode_filebase)rM�suffixrUs  �rVrgz,CloudArchiveShortcutHandler._encode_filebase~s����0�$�H�J�JrWc���|jd�\}}}|j�tvry|jd�\}}}|sy||_|xs|j
xst|_y)N�:Fr/T)�
rpartitionr;�UCA_PREFIXES�	partitionr5r=�UCA_DEFAULT_POCKET)rMrN�prefixr:r(r5r=s       rVr7z&CloudArchiveShortcutHandler._match_uca�se��#�.�.�s�3����C��|�|�~��-��!�m�m�C�0����F�������A����A�/A���rWc�V�	|jt|��S#t$rYywxYw�NF)�_match_handlerrr�rMrNs  rVr8z&CloudArchiveShortcutHandler._match_uri�s0��	��&�&�'9�(�'C�D�D��'�	��	����	(�(c�V�	|jt|��S#t$rYywxYwrq)rrrrrss  rVr9z.CloudArchiveShortcutHandler._match_sourceslist�s0��	��&�&�'A�(�'K�L�L��'�	��	�rtc���t|j�j�}|jtt�jk7ry|j�j
j
d�\}}}|j
d�\}}}t||f�sy||_|xs|jxst|_	|j|j�j�y)NFr0r/T)
r	�SourceEntry�uri�hostnamerKrRrm�allr5r=rnrLrT)rM�handler�parsedrCr:r5r=s       rVrrz*CloudArchiveShortcutHandler._match_handler�s����'�-�-�/�3�3�4���?�?�h�{�3�<�<�<�� '� 3� 3� 5� :� :� D� D�S� I���1�f� (� 2� 2�3� 7���1�f��H�f�%�&������A����A�/A������w�2�2�4�9�9�:�rWrY)�__name__�
__module__�__qualname__r4�propertyr[r^rergr7r8r9rr�
__classcell__)rUs@rVr,r,HsQ���')�R�!��!�����X�K����rWr,)rArarr:�"softwareproperties.shortcuthandlerrrr�softwareproperties.sourceslistr�softwareproperties.urir�urllib.parser	r?rEr]rKrlr>rnrcr,�rWrV�<module>r�sU��,
�� �J�J�E�5�!���i��
�y��
�i���	�	�
�H���H�
��x��
�h��
�h���X���H��
�h���X���X���X�� 
�h�!�"��#�$�������1��4��;��@����'���
�+��&�q�)��,��b�/�brW

Zerion Mini Shell 1.0