| Server IP : 159.69.118.108 / Your IP : 216.73.216.231 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu-4gb-fsn1-1 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 13:53:54 UTC 2025 aarch64 User : root ( 0) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/softwareproperties/__pycache__/ |
Upload File : |
�
��[i�q � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm Z m
Z
d dlmZ d dl
m
Z d dlmZ d dlmZmZmZ e j* � dZ G d � d
e� Z G d� de� Z G d
� de� Zy)� N)�
get_distro)�SourceEntry�SourcesList�Deb822SourceEntry)�suppress)�gettext)�urlparse)�get_source_entry_from_list�copy_source_entry�deb822_source_entry_containsz=gpg -q --no-options --no-default-keyring --batch --keyring %sc � � e Zd ZdZ d-d�Zed� � Zed� � Zed� � Zed� � Z e
d� � Ze
d � � Ze
d
� � Z
e
d� � Ze
d� � Ze
d
� � Zd.d�Ze
d� � Ze
d� � Zd� Zd� Zd� Zd� Zd� Zd� Ze
d� � Ze
d� � Ze
d� � Ze
d� � Zd� Zd� Ze
d� � Z e
d� � Z!e
d� � Z"e
d � � Z#e
d!� � Z$d"� Z%d#� Z&e
d$� � Z'e
d%� � Z(e
d&� � Z)e
d'� � Z*e
d(� � Z+d)� Z,d.d*�Z-d.d+�Z.d,� Z/y)/�ShortcutHandleraC Superclass for shortcut handler implementations.
This provides a way to take a apt repository reference, in various forms,
and write the specific apt configuration to local files. This also can
remove previously written configuration from local files.
This class and any subclasses should never modify any main apt configuration
files, only specifically named files in '.d' subdirs (e.g. sources.list.d, etc)
should be modified. The only exception to that rule is adding or removing
sourceslist lines or components of existing source entries.
Nc �� � || _ |xs g | _ || _ t � | _ |xs | j j
| _ || _ || _ || _ d | _ d | _
d | _ d | _ y �N)
�shortcut�
components�
enable_sourcer �distro�codename�pocket�dry_run�deb822�
_source_entry� _filebase� _username� _password) �selfr r r r r r r �kwargss �D/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py�__init__zShortcutHandler.__init__7 sr � � ��
�$�*����*��� �l��� �8�D�K�K�$8�$8��
���������� "��� ��������� c �L � t |� }|j xr |j S )z(Return if the uri is in valid uri format)r �scheme�netloc��cls�uri�parseds r �is_valid_urizShortcutHandler.is_valid_uriK s � � �#����}�}�.����.r! c � � t |� }|j |j j d� d �� j � S )z6Return the uri with the username and password stripped�@� �r$ )r �_replacer$ �
rpartition�geturlr% s r �uri_strip_authzShortcutHandler.uri_strip_authQ s= � � �#��� ���f�m�m�&>�&>�s�&C�A�&F��G�N�N�P�Pr! c � � t | j |� � }|�d|�d|j ��}|j |�� j � S )z6Return the uri with the username and password included�:r+ r- )r r1 r$ r. r0 )r&