__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��g�q����SSKrSSKrSSKrSSKrSSKrSSKJr SSKJrJ	r	J
r
 SSKJr SSK
J
r SSKJr SSKJrJrJr \R*"5 Sr"S	S
\5r"SS\5r"S
S\5rg)�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�,�\rSrSrSrS/Sjr\S5r\S5r\S5r	\S5r
\S	5r\S
5r
\S5r\S5r\S
5r\S5rS0Sjr\S5r\S5rSrSrSrSrSrSr\S5r\S5r\S5r\S5rSrSr \S5r!\S5r"\S 5r#\S!5r$\S"5r%S#r&S$r'\S%5r(\S&5r)\S'5r*\S(5r+\S)5r,S*r-S0S+jr.S0S,jr/S-r0S.r1g)1�ShortcutHandler�+a#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��XlU=(d /UlX0l[5UlU=(d URR
UlXPlX`lXplSUl	SUl
SUlSUlg�N)
�shortcut�
components�
enable_sourcer�distro�codename�pocket�dry_run�deb822�
_source_entry�	_filebase�	_username�	_password)	�selfrrrrrrr�kwargss	         �D/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py�__init__�ShortcutHandler.__init__7sh�� �
�$�*����*�� �l��� �8�D�K�K�$8�$8��
�������"������������c�V�[U5nUR=(a UR$)z(Return if the uri is in valid uri format)r	�scheme�netloc��cls�uri�parseds   r �is_valid_uri�ShortcutHandler.is_valid_uriKs ���#����}�}�.����.r#c��[U5nURURRS5SS9R	5$)z6Return the uri with the username and password stripped�@��r&)r	�_replacer&�
rpartition�geturlr's   r �uri_strip_auth�ShortcutHandler.uri_strip_authQs=���#������f�m�m�&>�&>�s�&C�A�&F��G�N�N�P�Pr#c��[URU55nU<SU<SUR<3nURUS9R	5$)z6Return the uri with the username and password included�:r.r0)r	r4r&r1r3)r(r)�username�passwordr*r&s      r �uri_insert_auth�ShortcutHandler.uri_insert_authYsC���#�,�,�S�1�2��%�x����?�����f��-�4�4�6�6r#c���SnUS-
n[R"5nUSU3-
n[U[5(dUR	5n[
R"UR5SU[
RS9RR5nSSS5 WR5Vs/sH.ofRS5(dMURS	5S
PM0 sn$!,(df   NY=f![
Ra#n[[S5U-5 /sSnA$SnAff=fs snf![ a [[S5W-5 /s$f=f)z�Return an array of fingerprint(s) for provided key(s).

The 'keys' parameter should be in text (str) or binary (bytes) format;
it is converted to bytes if needed, and then passed to the 'gpg' program.
zBgpg --show-keys -q --no-options --no-keyring --batch --with-colonsz& --with-fingerprint --with-fingerprint� --homedir T)�check�input�stdoutNz,Warning: gpg error while processing keys:
%s�fprr7�	zWarning: invalid gpg output:
%s)�tempfile�TemporaryDirectory�
isinstance�bytes�encode�
subprocess�run�split�PIPEr@�decode�CalledProcessError�print�_�
splitlines�
startswith�KeyError)r(�keys�cmd�homedirr@�e�ls       r �fingerprints�ShortcutHandler.fingerprints`s'��S���(�(��		��,�,�.�'���W�I�.�.��!�$��.�.��;�;�=�D�#����	�	��4�t�/9���@�@F��v�v�x��	/�	�-3�->�->�-@�X�-@��L�L�QV�DW�O�A�G�G�C�L��O�-@�X�X�/�.���,�,�	��!�C�D�q�H�I��I��	��Y���	��!�6�7�&�@�A��I�	�se�C;�A9C*�C;� D:�2D5�D5�'D:�*
C8�4C;�8C;�;D2�D-�'D2�-D2�5D:�:#E �E c	��[SUR5R<SSRUR5R5<35$)NzArchive for codename: z
 components: �,)rOr�dist�join�comps�rs r �description�ShortcutHandler.description|sA����#�#�%�*�*��8�8�D�,�,�.�4�4�5�7�8�	9r#c��UR$r)�archive_linkr_s r �web_link�ShortcutHandler.web_link�s��� � � r#c�6�UR5R$r)rr)r_s r rc�ShortcutHandler.archive_link�s�����!�%�%�%r#c�v�UR(aUR<SUR<3$UR$)N�-)rrr_s r r\�ShortcutHandler.dist�s&���;�;�"�m�m�T�[�[�9�9��}�}�r#c�.�URR$)z*Text indicating a binary-type SourceEntry.)r�binary_typer_s r rl�ShortcutHandler.binary_type�����{�{�&�&�&r#c�.�URR$)z*Text indicating a source-type SourceEntry.)r�source_typer_s r rp�ShortcutHandler.source_type�rnr#c��UR(d[S5e[UR5nU(dU$XR:XaUR	S5 O9XR
:XaUR	UR5 O[SU-5e[U[5(a	U/Ul
OXl[U5$)a�Get the SourceEntry representing this archive/shortcut.

This should never include any authentication data; if required,
the username and password should only be available from the
username and password properties, as well as from the
netrcparts_content property.

If pkgtype is provided, it must be either binary_type or source_type,
in which case this returns a SourceEntry with the requested type.
If pkgtype is not specified, this returns a SourceEntry with an
implementation-dependent type (in most cases, implementations should
default to binary_type).

Note that the default SourceEntry will be returned without modification,
and the implementation will determine if it is enabled or disabled;
while the source-type SourceEntry will be enabled or disabled based on
self.enable_source.  The binary-type SourceEntry will always be enabled.

The SourceEntry 'file' field should always be set to the value of
sourceparts_file.
z3Implementation class did not set self._source_entryTzInvalid pkgtype: %s)r�NotImplementedErrorrrl�set_enabledrpr�
ValueErrorrEr�types�type)r�pkgtyperVs   r r�ShortcutHandler.SourceEntry�s���,�!�!�%�&[�\�\��d�0�0�1����H��&�&�&�
�M�M�$��
�(�(�
(�
�M�M�$�,�,�-��2�W�<�=�=��a�*�+�+��i�A�G��F� ��#�#r#c��UR$)a/Return the username used for authentication

If authentication is used, return the username; otherwise return None.

By default, this returns the private variable self._username, which
defaults to None.  Subclasses should override this method and/or
set self._username if they have authentication data.
)rr_s r r8�ShortcutHandler.username�����~�~�r#c��UR$)a/Return the password used for authentication

If authentication is used, return the password; otherwise return None.

By default, this returns the private variable self._password, which
defaults to None.  Subclasses should override this method and/or
set self._password if they have authentication data.
)rr_s r r9�ShortcutHandler.password�r|r#c�d�UR5 UR5 UR5 g)z�Save all data for this shortcut to file(s).

This writes everything to the relevant files.  By default, it
calls add_source(), add_key(), and add_login().  Subclasses
should override it if other actions are required.
N)�
add_source�add_key�	add_loginr_s r �add�ShortcutHandler.add�s!��	
�����������r#c�D�UR5 UR5 g)aRemove all data for this shortcut from file(s).

This removes everything from the relevant files.  By default, it
only calls remove_source() and remove_login().  Subclasses
should override it if other actions are required.  Note that by
default is does not call remove_key().
N)�
remove_source�remove_loginr_s r �remove�ShortcutHandler.remove�s��	
�������r#c���[SS9nSnURUR5nUH.n[U[5(dM[XC5(dM,Un O Ub.[
[S5URUR4-5 O�URSSS/URS9nURUlURUlURUl
URUlUR(agURR!5nUVs/sHnSUR#5(aUOS-PM! nnSSR%U5-UR&S	'UnUR((a�UR*[-UR5;a�SnURUR*5nUH.n[U[5(dM[XG5(dM,Un O Ub.[
[S5UR*UR4-5 OURUR*/UlUR.(Gd[0R2R5UR5(d�URR7UR85(aO[0R2R5UR85(d![0R:"UR8S
5 [=URS5 [0R>"URUR@5 SSS5 URC5 ggs snf!,(df   N%=f)NT�r�Found existing %s entry in %s���file� �.�
z	Signed-By���w)"rrrlrErrrNrOr�r��sourceparts_filerv�uris�suitesr^�trustedparts_contentrP�stripr]�sectionrrp�setr�os�path�existsrQ�sourceparts_path�mkdir�open�chmod�sourceparts_mode�save)r�sourceslist�newentry�binentry�s�linesrW�srcentrys        r �_add_deb822_source�"ShortcutHandler._add_deb822_source�s���!��.�����#�#�D�$4�$4�5���A��a�!2�3�3��+�A�8�8����
����!�3�4��8H�8H�8@�
�
�8G�G�
H�#���r�2�r�2�,0�,A�,A�'�C�H�%�^�^�H�N�$�M�M�H�M�&�o�o�H�O�%�^�^�H�N��(�(��1�1�<�<�>��BG�H�%�Q��Q�W�W�Y�Y��C�8�%��H�04�t�y�y��7G�0G�� � ��-������$�"2�"2�#�h�n�n�:M�"M��H��'�'��(8�(8�9�H� ��!�!�%6�7�7��/��<�<� �H��
!��#��a�7�8�D�<L�<L�<D�M�M�<K�K�L�#'�"2�"2�D�4D�4D�!E����|�|�|��7�7�>�>�(�-�-�0�0��M�M�,�,�T�-B�-B�C�C��G�G�N�N�4�+@�+@�A�A��H�H�T�2�2�E�:��(�-�-��-��H�H�X�]�]�D�,A�,A�B�.�������/I�:.�-�s�&M�	,M�
M"c���UR(aUR5 gURUR5nURUR5nUR
n[
5n[XA5nUb.[[S5URUR4-5 OVURURURURURURS9nUR UlURUR:wa"[[S5UR-5 O�UR"(a<[S5RUl[[S5UR-5 OlUR (a.[[S5URUR4-5 O-[[S5URUR4-5 UnURUl[XB5nUb.[[S5URUR4-5 OVURURURURURURS9nUR UlURUR:wa"[[S5UR-5 OlUR (a.[[S5URUR4-5 O-[[S5URUR4-5 UnUR$(d�['URUR/5H�n[(R*R-U5(aM)UR/UR05(aO[(R*R-UR05(d![(R2"UR0S	5 [5US
5 [(R6"Xc5 SSS5 M� UR95 gg!,(df   M�=f)a�Add the apt SourceEntries.

This uses SourcesList to add the binary-type and source-type
SourceEntries.

If the SourceEntry matches a known apt template, this will ignore
the sourceparts_file and instead place the SourceEntries into
the main/default sources.list file.  Otherwise, this will add
the SourceEntries into the sourceparts_file.

If either the binary-type or source-type entry exist in the current
SourcesList, the existing entries are updated instead of placing
the entries in the sourceparts_file.
Nr�)r)r\r�rw�
orig_compsz+Updating existing entry instead of using %sr�z!Archive has template, updating %szAdding disabled %s entry to %szAdding %s entry to %sr�r�)rr�rrlrpr�rr
rNrOrwr�r�r)r\r^�disabled�templaterr�r�r�r�rQr�r�r�r�r�)rr�r��moder�r��	entryfiles       r r��ShortcutHandler.add_source,s!���;�;��#�#�%���#�#�D�$4�$4�5���#�#�D�$4�$4�5���$�$��!�m��-�k�D�����!�3�4��
�
�x�}�}�7U�U�V�"����L�L��]�]��]�]��]�]�#�>�>�'��H�!)� 1� 1�H���=�=�H�M�M�)��!�A�B�X�]�]�R�S�
�
�
�'��O�0�0�H�M��!�7�8�8�=�=�H�I�
�
�
��!�4�5�����
�
�8V�V�W��!�+�,��
�
�x�}�}�/M�M�N���!�
�
��
�-�k�D�����!�3�4��
�
�x�}�}�7U�U�V�"����L�L��]�]��]�]��]�]�#�>�>�'��H�!)� 1� 1�H���=�=�H�M�M�)��!�A�B�X�]�]�R�S�
�
�
��!�4�5�����
�
�8V�V�W��!�+�,��
�
�x�}�}�/M�M�N����|�|� �(�-�-����!?�@�	��w�w�~�~�i�0�0�!�,�,�T�-B�-B�C�C� "�����t�/D�/D� E� E�����!6�!6��>��i��-�����1�.�-�
A�
�����.�-�s�Q�
Q	c�<�[SS9nURUR5nUH`n[U[5(dM[X25(dM,[
[S5UR-5 UnURU5  O UR(dfUR5 UVs/sH o3RUR:XdMUPM" sn(d"[R"UR5 gggs snf![[4a gf=f)NTr�zRemoving entry from %s)rrrlrErrrNrOr�r�rr�r��OSError�IOError)rr�r�r�s    r �_remove_deb822_source�%ShortcutHandler._remove_deb822_source�s���!��.���#�#�D�$4�$4�5���A��a�!2�3�3��+�A�8�8��a�0�1�Q�V�V�<�=����"�"�8�,����|�|�����*�F�{�!�f�f��
�
�.E�A�{�F���I�I�h�m�m�,�G���F�� ��)����s�0D�D�  D�D�Dc�r�UR(aUR5 g[5n[UVs/sHo"RPM sn5nURUR5nURUR5nSUlSUlUHGn[XE/U5cM[[S5URUR4-5 SUlMI UVs/sH ofRUR:XdMUPM" nnUVs/sH*o"R(aMUR(aM(UPM, sn(dXUHRnUR(d-[[S5URUR4-5 URU5 MT UR (dWUR#5 U[UVs/sHo"RPM sn5-
Hn[$R"U5 M ggs snfs snfs snfs snf![&[(4a MGf=f)a.Remove the apt SourceEntries.

This uses SourcesList to remove the binary-type and source-type
SourceEntries.

This must disable the corresponding SourceEntries, from whatever file(s)
they are located in.  This must not disable more than matches, e.g.
if the existing SourceEntry line contains more components this must
edit the existing line to remove this SourceEntry's component(s).

After disabling all matching SourceEntries, if the sourceparts_file is
empty or contains only invalid and/or disabled SourceEntries, this
may remove the sourceparts_file.
NFzDisabling %s entry in %sTz"Removing disabled %s entry from %s)rr�rr�r�rrlrpr�r
rNrOrwr��invalidr�rr�r�r�r�)	rr�rV�
orig_filesr�r�r��file_entriesr�s	         r r��ShortcutHandler.remove_source�s����;�;��&�&�(��!�m���+�6�+�Q�&�&�+�6�7�
��#�#�D�$4�$4�5���#�#�D�$4�$4�5��!���!����A�)�8�*=�q�A�M��a�2�3�q�v�v�q�v�v�6F�F�G�!��
��
$/�R�;�a�&�&�D�<Q�<Q�2Q��;��R�'�L�<�a�y�y������<�L�!���y�y��!�@�A�Q�V�V�Q�V�V�DT�T�U��"�"�1�%�"�
�|�|�����"�S�+�)F�+�Q�&�&�+�)F�%G�G����I�I�d�O�H���+7��S��L��*G�� ��)����s;�H�'H�H�H�,H�?H�H
�2H"�"H6�5H6c�@�[RRS5$)zAReturn result of apt_pkg.config.find_dir("Dir::Etc::sourceparts")zDir::Etc::sourceparts��apt_pkg�config�find_dirr_s r r�� ShortcutHandler.sourceparts_path�s���~�~�&�&�'>�?�?r#c�^�UR(aSOSnURXRS9$)aAGet the sources.list.d filename, without the leading path.

By default, this combines the filebase with the codename, and uses a
extension of 'list' if deb822 is not enabled, and 'sources' if deb822
is enabled.  This is different than the trustedparts or
netrcparts filenames, which use only the filebase plus extension.
�sources�list��suffix)r�_filebase_to_filenamer)r�exts  r �sourceparts_filename�$ShortcutHandler.sourceparts_filename�s)�� �;�;�i�F���)�)�#�m�m�)�D�Dr#c�N�URURUR5$)a�Get the sources.list.d absolute-path filename.

Note that the add_source() function will not use this file if this shortcut's
SourceEntry matches a known apt template; instead the entries will be placed
in the main sources.list file.  Also, if the SourceEntry already exists in
the SourcesList, it will be edited in place, instead of using this file.
See add_source() for more details.
)�_filename_to_filer�r�r_s r r�� ShortcutHandler.sourceparts_file�s#���%�%�d�&;�&;�T�=V�=V�W�Wr#c��g)z�Mode of sourceparts file.

Note that add_source() will only use this mode if it creates a new file
for sourceparts_file; if the file already exists or if the SourceEntry is
saved in a different file, this mode is not used.
��r_s r r�� ShortcutHandler.sourceparts_mode�s��r#c�z�UR(ag[URUR45(dgURnURn[	U[
5(dUR
5nURU5n[[S5USRU54-5 [U-nSnUR(Gd&[RRU5(d�UR!UR"5(aM[RRUR"5(d[R$"UR"SS9 UR&(a5[)US5 [R*"XR&5 SSS5 [,R."5nUSUS	U3-
n[0R2"UR55S
US9 SSS5 gg!,(df   N^=f!,(df   g=f![0R6an[9U5eSnAff=f)a+Add the GPG key(s) corresponding to this repo.

By default, if self.trustedparts_content contains content,
and self.trustedparts_file points to a file, the key(s) will
be added to the file.

If the file does not yet exist, and self.trustedparts_mode is set,
the file will be created with that mode.
Nz$Adding key to %s with fingerprint %sr[z--importr��r��wbr=r�T)r>r?)r�all�trustedparts_filer�rErFrGrXrNrOr]�GPG_KEYRING_CMDrr�r�r�rQ�trustedparts_pathr��trustedparts_moder�r�rCrDrHrIrJrM�ShortcutException)r�destrS�fprT�actionrUrVs        r r��ShortcutHandler.add_key�s����;�;���D�*�*�D�,E�,E�F�G�G���%�%���(�(���$��&�&��;�;�=�D�
�
�
�t�
$��
�a�6�7�4����"��:N�N�O���$�����|�|�|��7�7�>�>�$�'�'��O�O�D�$:�$:�;�;��G�G�N�N�4�+A�+A�B�B��H�H�T�3�3�%�@��)�)��d�D�)�����'=�'=�>�*�
+��0�0�2�g��[��	��6�(�;�;�C��N�N�3�9�9�;�d�$�G�3�2��*�)��3�2���0�0�
+�'��*�*��
+�sB�;!G4�%H�:0H�*H�4
H�
H�H�H�H:�*H5�5H:c�r�[URUR45(dgURnURUR5n[R
R
U5(dg[[S5USRU54-5 [U-nSSRU5-nUR(d�[R"5nUSUSU3-
n[R"UR!5SS9 SSS5 ['US	5nURUR)55(+nSSS5 W(a[R*"U5 ggg!,(df   Ng=f![R"an[%U5eSnAff=f!,(df   Nf=f)
a�Remove the GPG key(s) corresponding to this repo.

By default, if self.trustedparts_content contains content,
and self.trustedparts_file points to a file, the key(s) will
be removed from the file.

If the file contains no more keys after removal, the file will
be removed.

This does not consider other files; multiple repositories may
use the same signing key.  This only modifies/removes
self.trustedparts_file.
Nz(Removing key from %s with fingerprint %sr[z--delete-keys %sr�r=T)r>�rb)r�r�r�rXr�r�r�rNrOr]r�rrCrDrHrIrJrMr�r��readr�)	rr�r�rTr�rUrV�f�emptys	         r �
remove_key�ShortcutHandler.remove_keysV���D�*�*�D�,E�,E�F�G�G���%�%��
�
�
�t�8�8�
9���w�w�~�~�d�#�#��
�a�:�;�t�S�X�X�b�\�>R�R�S���$��#�c�h�h�r�l�2���|�|�
+��0�0�2�g��[��	��6�(�;�;�C��N�N�3�9�9�;�d�;�3��d�D�!�Q� �-�-�a�f�f�h�7�7��"���	�	�$����2�2���0�0�
+�'��*�*��
+��"�!�sB�F� /E0�F�#%F(�0
E>�:F�>F�F%�F � F%�(
F6c�@�[RRS5$)zBReturn result of apt_pkg.config.find_dir("Dir::Etc::trustedparts")zDir::Etc::trustedpartsr�r_s r r��!ShortcutHandler.trustedparts_pathGs���~�~�&�&�'?�@�@r#c�$�URS5$)z9Get the trusted.gpg.d filename, without the leading path.�gpg�r�r_s r �trustedparts_filename�%ShortcutHandler.trustedparts_filenameLs���)�)�%�0�0r#c�N�URURUR5$)z-Get the trusted.gpg.d absolute-path filename.)r�r�r�r_s r r��!ShortcutHandler.trustedparts_fileQs#���%�%�d�&<�&<�d�>X�>X�Y�Yr#c��g)z&Content to put into trusted.gpg.d fileNr�r_s r r��$ShortcutHandler.trustedparts_contentVs��r#c��g)zMode of trustedparts filer�r�r_s r r��!ShortcutHandler.trustedparts_mode[���r#c�D�[URUR45(dgURnURn[RRU5(+nSnU(d�[
US5nUR5Vs/sHofR5PM nnSSS5 [[5 WSSnSSS5 [UR5Vs/sHofR5W;PM sn5(a[[S5U-5 g[[S5U-5 UR(GdU(a�URUR 5(aM[RRUR 5(d[R""UR SS9 UR$(a5[
US	5 [R&"XR$5 SSS5 [
US
5nUS:waUR)S5 UR)UR5 SSS5 ggs snf!,(df   GN�=f!,(df   GN�=fs snf!,(df   N�=f!,(df   g=f)z�Add the login credentials corresponding to this repo.

By default, if self.netrcparts_content contains content,
and self.netrcparts_file points to a file, the file will be
created and content placed into it.
Nr��r���z!Authentication data already in %sz Adding authentication data to %sr�r�r��a)r��netrcparts_file�netrcparts_contentr�r�r�r��	readlinesr�rrRrPrNrOrrQ�netrcparts_pathr��netrcparts_moder��write)rr��content�newfile�	finalcharr�rWr�s        r r��ShortcutHandler.add_login`s����D�(�(�$�*A�*A�B�C�C���#�#���)�)���g�g�n�n�T�*�*���	���d�C��A�,-�K�K�M�:�M�q����M��:�!��(�#�!�"�I�b�M�	�$���0B�0B�0D�E�0D�1�G�G�I��&�0D�E�F�F��a�;�<�t�C�D��
�a�2�3�d�:�;��|�|�|���O�O�D�$8�$8�9�9��G�G�N�N�4�+?�+?�@�@��H�H�T�1�1��>��'�'��d�C������';�';�<�)��d�C��A���$��G�G�D�M�����/�/�0�	!����;�!���#�#��E�)��� ��sH�9I�I�%I�>	I)�&I;� !J�3J�I�
I&�)
I8�
J�
Jc��[URUR45(dgURn[URR	5Vs/sHo"R5PM sn5n[RRU5(dg[US5n[UR5Vs/sHo"R5PM sn5nSSS5 WU-(d[[S5U-5 O_[[S5U-5 UR(d7[US5nURSRXS-
55 SSS5 UR(dW[US5nUR!5R5(+nSSS5 W(a[R""U5 gggs snfs snf!,(df   GN=f!,(df   N�=f!,(df   N[=f)avRemove the login credentials corresponding to this repo.

By default, if self.netrcparts_content contains content,
and self.netrcparts_file points to a file, the content will
be removed from the file.

If the file is empty (other than whitespace) after removal, the file
will be removed.

This does not consider other files; this only modifies/removes
self.netrcparts_file.
Nr�z'Authentication data not contained in %sz$Removing authentication data from %sr�r�)r�r�r�r�rPr�r�r�r�r�r�rNrOrr�r]r�r�)rr�rWrr��filecontentr�s       r r��ShortcutHandler.remove_login�sl���D�(�(�$�*A�*A�B�C�C���#�#���$�*A�*A�*L�*L�*N�O�*N�Q�w�w�y�*N�O�P���w�w�~�~�d�#�#��
�$��_���!�+�+�-�@�-�Q�w�w�y�-�@�A�K���W�$��!�=�>��E�F��!�:�;�d�B�C��<�<��$��_���G�G�D�I�I�k�&;�<�=�%��|�|��d�C��A��F�F�H�N�N�,�,��!���	�	�$�����P��A��_��%�_��!��s<�G�&G�>G
�G�<#G,�$G=�G�
G)�,
G:�=
Hc�@�[RRS5$)z@Return result of apt_pkg.config.find_dir("Dir::Etc::netrcparts")zDir::Etc::netrcpartsr�r_s r r��ShortcutHandler.netrcparts_path�s���~�~�&�&�'=�>�>r#c�$�URS5$)z7Get the auth.conf.d filename, without the leading path.�confr�r_s r �netrcparts_filename�#ShortcutHandler.netrcparts_filename�s���)�)�&�1�1r#c�N�URURUR5$)z+Get the auth.conf.d absolute-path filename.)r�r�rr_s r r��ShortcutHandler.netrcparts_file�s#���%�%�d�&:�&:�D�<T�<T�U�Ur#c�F�[URUR45(dg[UR	5R
5Rn[UR	5R
5RnSUUSURSUR3$)z�Content to put into auth.conf.d file

By default, if both username and password are set, this will return a proper
netrc-formatted line with the authentication information, including the
hostname and path.
Nzmachine z login z
 password )r�r8r9r	rr)�hostnamer�)rrr�s   r r��"ShortcutHandler.netrcparts_content�s����D�M�M�4�=�=�1�2�2���D�,�,�.�2�2�3�<�<����(�(�*�.�.�/�4�4���(��D�6������z�$�-�-��Y�Yr#c��g)zMode of netrcparts filei�r�r_s r r��ShortcutHandler.netrcparts_mode�r�r#c��UR(a[XRS9nO[XRS9n[	[UR5[UR5-5Ul[U5Ul	g)z�Set the SourceEntry.

This should be called from subclasses to set the SourceEntry.
The SourceEntry file will be set to the sourceparts_file value.

The self.components, if any, will be added to the line's component(s).
r�N)
rrr�rr�r�r^rrr)r�linerVs   r �_set_source_entry�!ShortcutHandler._set_source_entry�sZ���;�;�!�$�-B�-B�C�A��D�'<�'<�=�A��s�1�7�7�|�c�$�/�/�&:�:�;���.�q�1��r#c��URnU(dgU(aUSU--
n[R"SSUR55$)Nz-%sz[^a-z0-9_-]+rO)r�re�sub�lower)rr��bases   r �_encode_filebase� ShortcutHandler._encode_filebase�s;���~�~������E�F�N�"�D��v�v�n�c�4�:�:�<�8�8r#c�B�URUS9nU(dgU<SU<3$)Nr�r�)r)rr�r�rs    r r��%ShortcutHandler._filebase_to_filename�s&���$�$�F�$�3������$�$r#c�P�U(dg[RRX5$r)r�r�r])rr��names   r r��!ShortcutHandler._filename_to_file�s�����w�w�|�|�D�'�'r#)rrrrrrrrrrrr)NFNNFFr)2�__name__�
__module__�__qualname__�__firstlineno__�__doc__r!�classmethodr+r4r:rX�propertyr`rdrcr\rlrprr8r9r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�rrr�r��__static_attributes__r�r#r rr+s���
�AF�CH��(�/��/�
�Q��Q��7��7�����6�9��9�
�!��!��&��&�����
�'��'��'��'�'$�R�	��	��	��	�	�	�9�vX�t�,/�b�@��@��	E��	E��	X��	X�����)+�V& �P�A��A��1��1��Z��Z���������&1�P$ �L�?��?��2��2��V��V��Z��Z�����2� 9�%�(r#rc��\rSrSrSrSrg)r�i�z-General Exception during shortcut processing.r�N�r$r%r&r'r(r+r�r#r r�r��s��7�r#r�c��\rSrSrSrSrg)�InvalidShortcutExceptioni�z�Invalid shortcut.

This should only be thrown from the constructor of a ShortcutHandler
subclass, and only to indicate that the provided shortcut is invalid
for that ShortcutHandler class.
r�Nr-r�r#r r/r/�s���	r#r/)r�r�rrHrC�aptsources.distror�aptsources.sourceslistrrr�
contextlibrrrO�urllib.parser	�softwareproperties.sourceutilsr
rr�initr��objectr�	Exceptionr�r/r�r#r �<module>r8sl��$�	�	���(�P�P�� �!�J�J�
����Q��G(�f�G(�T	�	�	�
	�0�	r#

Filemanager

Name Type Size Permission Actions
AptAuth.cpython-313.pyc File 5.21 KB 0644
CountryInformation.cpython-313.pyc File 2.14 KB 0644
MirrorTest.cpython-313.pyc File 10.88 KB 0644
SoftwareProperties.cpython-313.pyc File 46.85 KB 0644
__init__.cpython-313.pyc File 628 B 0644
cloudarchive.cpython-313.pyc File 7.36 KB 0644
distro.cpython-313.pyc File 1.48 KB 0644
ppa.cpython-313.pyc File 11.7 KB 0644
shortcuthandler.cpython-313.pyc File 37.76 KB 0644
shortcuts.cpython-313.pyc File 1.01 KB 0644
sourceslist.cpython-313.pyc File 2.03 KB 0644
sourceutils.cpython-313.pyc File 3.26 KB 0644
uri.cpython-313.pyc File 1.84 KB 0644
Filemanager