0x1949 Team - FAZEMRX - MANAGER
Edit File: cloudarchive.cpython-310.pyc
o ��7eB � @ s d dl Z d dlZd dlmZ d dlmZmZmZ d dlm Z d dl mZ d dlm Z i dd�d d�d d�dd�dd �dd �dd �dd �dd�dd�dd�dd�dd�dd�dd�dd�dd�dddddddd��ZdZd Zd!Zd"d#gZd$d%gZed Zd&ZG d'd(� d(e�ZdS ))� 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 sj e Zd Z� fdd�Zedd� �Zedd� �Zdd� Zd� fd d� Zdd � Z dd� Z dd� Zdd� Z� Z S )�CloudArchiveShortcutHandlerc s� t t| �j|fi |�� d | _t| �|�| �|�| �|�f�s)td�| }t |��| j� � | _d| j | _| j� � | _| jt vrKtd�| j }t|��| jtvr[td�| j }t|��t| j }t|t�d�ph|f�}| j|vr�td�| j�� |�� f }t|��t� d| j�� � �| _| jdkr�| jd 7 _| js�| j� d | j� d| j� �}d�| j�p�d }| j� dt� d|� d|� �}| �|� d S d S )Nz¬ a valid cloud-archive format: '%s'zcloudarchive-%sz¬ 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�msgr@ � validnames�dist�comps�line�� __class__� �A/usr/lib/python3/dist-packages/softwareproperties/cloudarchive.pyr1 I sB � � �z$CloudArchiveShortcutHandler.__init__c C s | j S �N)rC �rJ rT rT rU �descriptionr s z'CloudArchiveShortcutHandler.descriptionc C s t S rV )�WEB_LINKrW rT rT rU �web_linkv s z$CloudArchiveShortcutHandler.web_linkc C s t jdt� ��� dd� d S )Nzapt-get install -y T)�check)� subprocess�run�UCA_KEYRING_PACKAGE�splitrW rT rT rU �add_keyz s z#CloudArchiveShortcutHandler.add_keyNc s t t| ��� S rV )r0 r* �_encode_filebase)rJ �suffixrR rT rU ra ~ s z,CloudArchiveShortcutHandler._encode_filebasec C sR |� d�\}}}|�� tvrdS |�d�\}}}|sdS || _|p%| jp%t| _dS )N�:Fr, T)� rpartitionr8 �UCA_PREFIXES� partitionr2 r: �UCA_DEFAULT_POCKET)rJ rK �prefixr7 r'