%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�2e�+���dZddlZddlZddlZddlmZejdddk(rddlmZ	nddl	Z	ddlm
Z
ddlmZdd	lmZdd
lm
Z
ddlmZddl�Gd
�de	j e	j"�Zdd�Zd�Zd�Zd�Zd�Zd�Zedk(r�ddlZej9�eej:dd�Zeej@jC��D][\Z"Z#e"jId�s e%ej@e"ejL�r�8e'e"�de#�de(ej@e"��d���]e'de)ejU��z�yy)zD
Main for parse command line, check for consistency, and set config
�N)�dedent�)��)�argparse311)�backend)�config)�cli_util)�gpg)�util)�*c��eZdZdZy)�DuplicityHelpFormatterz�
    A working class to combine ArgumentDefaults, RawDescription.
    Use with make_wide() to insure we catch argparse API changes.
    N)�__name__�
__module__�__qualname__�__doc__���4/usr/lib/python3/dist-packages/duplicity/cli_main.pyrr,s��rrc�z���	||d���di�����fd�S#t$rtjd��cYSwxYw)z�
    Return a wider HelpFormatter, if possible.
    See: https://stackoverflow.com/a/5464440
    Beware: "Only the name of this class is considered a public API."
    )�width�max_help_positionc����|fi���S�Nr)�prog�	formatter�kwargss ��r�<lambda>zmake_wide.<locals>.<lambda><s���I�d�5�f�5�rz-argparse help formatter failed, falling back.r)�	TypeError�warnings�warn)r�w�hrs`  @r�	make_wider%3sE�����1�5���!�&�!�5�5�����
�
�E�F����s�� :�:c
�v�d}tjj�D]b\}}|jd�r�dt	|��ddj|���}||d�dt	|��ddj|���z
}|dz
}�d|dz
}t
jdd	d
tt�|tzddd
�|��S)z5
    Return properly defined overrideable parser
    zpositional args:
�__z  � �48z# duplicity z [options] �
�	duplicityNTF)r�argument_default�formatter_class�epilog�allow_abbrev�
exit_on_errorr)�DuplicityCommands�__dict__�items�
startswith�var2cmd�join�argparse�ArgumentParserr%r�help_footer)r�action_help�var�meta�
action_strs     r�
new_parserr>Bs���'�K�&�/�/�5�5�7��	��T��>�>�$����'�#�,��q����$��(8�9�
��*�R��L�����k�RU�RZ�RZ�[_�R`�Qa�b�b���t�����4��K��"�"��
��!�"8�9��[�(���
���rc��t|�D�cgc]}|s�|jd�r�|��c}D]}t||�}tt||��!ycc}w)z�
    Copy all arguments and their values to the config module.  Don't copy
    attributes that are 'hidden' (start with an underscore) or whose name is
    the empty string (used for arguments that don't directly store a value
    by using dest="")
    �_N)�dirr4�getattr�setattrr	)�args�x�f�vs    r�harvest_namespacerHZsJ���T��
B�A�a����S�0A�a�
B����D�!������1����
Bs�A�A�Ac��td��}tt�D]J}t|�}|gtj
j
|g�z}|j|it|���L	|j|�\}}||fS#tjtjf$r}tt|���d}~wwxYw)z�
    Parse the commands and options that need to be handled first.
    Mainly to make sure logging goes to the right place with correct verbosity.
    Everything else is passed on to the main parsers.
    F)�add_helpN)r>�sorted�logging_options�opt2var�
OptionAliasesr2�get�add_argument�OptionKwargs�parse_known_intermixed_argsr7�
ArgumentError�ArgumentTypeError�CommandLineError�str)�arglist�parser�optr;�namesrD�	remainder�es        r�parse_log_optionsr]fs�����
'�F��o�&�9���c�l����
�.�.�2�2�3��;�;������U�8�l�3�&7�8�9�'� �<�<�W�E���i���?���
�"�"�H�$>�$>�?�'��s�1�v�&�&��'�s�*B�#B>�%B9�9B>c��t|�\}}t�}tt�D]J}t	|�}|gt
jj|g�z}|j|it|���L	|j|�\}}|D]�}|j!d�s�|t"vrt%t'd|�d����6|t(vrBdj+d�tt(�D��}t%t'd|�d��|�z���|t,vs��|j.dvs��dj+d	�tt,�D��}t%t'd|�d
��|�z���t1|�dk(r�|dt2vr�t5|d�r?t7|d
�r1t8j;t=d��|j?dd�nst7|d�r?t5|d
�r1t8j;t=d��|j?dd�n&t=d|d�d|�dt2���}	t%|	�|r|dt2vr|d|_nt%d�tA|j.�}tBjj|d�}
|
swtDjjG�D]V\}}|j!d�r�|j.|vs�'tBjj|d�}
tI|�|_�X|
st%d|j.�d��t1|
�t1|d
d�k(rBtK|
|d
d�D]/\}}
tMtNd|���}tQtR|||
���1n:t%d|j.�dt1|d
d��dt1|
��d|d
d�d�	�tU|�|S#tjtjf$r}tt|���d}~wwxYw)z<
    Parse remaining argument list once all is defined.
    N�-z                         Option 'z� was changed in 2.0.0.
                            --file-to-restore to --path-to-restore
                            --do-not-restore-ownership to --no-restore-ownership
                            r*c3�&K�|]	}d|�����y�w�z    Nr��.0�cs  r�	<genexpr>z(parse_cmdline_options.<locals>.<genexpr>�s����3`�1�d�1�#�J�3`���z�' was removed in 2.0.0.
                        The following options were deprecated and removed in 2.0.0
                        )�backup�full�incrementalc3�&K�|]	}d|�����y�wrarrbs  rrez(parse_cmdline_options.<locals>.<genexpr>�s����3g�1�d�1�#�J�3g�rfz�' was removed for backup actions in 2.0.0.
                        The following options were deprecated and removed in 2.0.0
                        rr�zhNo valid action found. Will imply 'backup' because a path source was given and target is a url location.rgzdNo valid action found. Will imply 'restore' because url source was given and target is a local path.�restorez	Invalid 'z9' action and cannot be implied from the given arguments:
z
Valid actions are: z/Missing or invalid explicit or implicit action.r'�'z!' is not a valid action or alias.�check_z%Wrong number of positional args for 'z', got z

Expected z positionals from �.)+r]r>rK�all_optionsrMrNr2rOrPrQrRr7rSrTrUrVr4�changed_options�command_line_errorr�removed_optionsr6�removed_backup_options�action�len�all_commands�is_path�is_url�log�Noticer@�insert�cmd2varr1�CommandAliasesr3r5�ziprBr
rCr	rH)rWrDr[rXrYr;rZr\�removed_commands_string�msg�
arg_checks�aliases�name�val�funcs               r�parse_cmdline_optionsr�~s��
(��0�O�D�)��\�F��k�"�9���c�l����
�.�.�2�2�3��;�;������U�8�l�3�&7�8�9�'� �<�<�Y�G���i�
�!���>�>�#���o�%�"��!�!$��&� �����'�*.�)�)�3`���H_�3`�*`�'�"��!�!$��&���1�1�
3���.�.�4�;�;�Bc�3c�*.�)�)�3g��Oe�Hf�3g�*g�'�"��!�!$��&���1�1�
3��3!�J�9�~���y��|�<�?��9�Q�<� �V�I�a�L�%9��J�J��L��
�
���Q��)�
�I�a�L�
!�g�i��l�&;��J�J��G��
�
���Q�	�*���I�a�L�>�*%�%,�I�.&�&2�^�5��C�

�s�#��Y�q�\�\�1���l����L�M��$�+�+�
�C�"�+�+�/�/��T�:�J��*�3�3�9�9�;�	+�L�C���~�~�d�#���{�{�g�%�.�7�7�;�;�C��F�
�%�c�l���	+���Q�t�{�{�m�+L�M�N��:��#�i���m�,�,��Z��1�2��7�	-�I�D�#��8�v�d�V�_�5�D��F�D�$�s�)�,�	-�	�3�D�K�K�=���I�VW�VX�M�HZ�G[�\��J��(�(:�9�Q�R�=�/��
L�	
��d���K��G
�"�"�H�$>�$>�?�'��s�1�v�&�&��'�s�6O�#P�2P�Pc�x�tj�t_t	|�}tj
�nt
jtj�}tj|j|j|j|j��t_ntjd�t_djtt tjj"��}t$j't)dtj
�d|����tj*dvr)tj*dk(rd	t_d
t_t/j0�tj2xstj4}|rt/j6|�t_ndt_tj8xstj:}|r@t<j?t<j?|�jA��t_!ndt_!tjD�tG|�t_"tItKtjLtjD��tjNt_(tj*dvr
tS�t$j't)dtjTjV����t$j't)d
tjD����tj*S)z*
    Process command line, set config
    N)�
passphrase�sign_key�
recipients�hidden_recipientsrrozGPG binary is z
, version )rirgrgT�inc)rhr��verifyzUsing archive dir: zUsing backup name: ),r�
GPGProfiler	�gpg_profiler��
gpg_binary�copy�deepcopyr�r�r�r�r�whichr6�maprV�gpg_versionrz�Infor@ru�implied_incr�import_backends�
source_url�
target_url�get_backend�source_path�
target_dir�path�Path�
get_canonical�
local_path�backup_name�generate_default_backup_name�set_archive_dir�expand_archive_dir�archive_dir�count�keep_chains�
set_selection�archive_dir_path�uc_name)�cmdline_listrD�srcr��
remote_urlr�s      r�process_command_liner��s$��
���)�F��!��.�D����$��m�m�F�.�.�/�� �^�^��~�~��\�\��~�~�!�3�3�	
���!�J�J�u�-����(�(�3�s�F�$6�$6�$B�$B�C�D�K��H�H�Q��� 1� 1�2�*�[�M�J�
K�L��}�}�1�1��=�=�H�$�!%�F����
������"�"�7�f�&7�&7�J�� �,�,�Z�8�������#�#�8�v�'8�'8�J�� �I�I�d�i�i�
�&;�&I�&I�&K�L��� ������!�9�*�E����&�v�'9�'9�6�;M�;M�N�O� ���F���}�}�1�1����H�H�Q�$�V�%<�%<�%D�%D�$E�F�
G�H��H�H�Q�$�V�%7�%7�$8�9�
:�;��=�=�r�__main__rkr@z = z (�)zverbosity: )�x�.)+rr��inspect�sys�textwrapr�version_infor+rr7rr	r
rr�duplicity.cli_data�ArgumentDefaultsHelpFormatter�RawDescriptionHelpFormatterrr%r>rHr]r�r�r�typesrz�setup�argvrurKr2r3�arGr4�
isinstance�
ModuleType�print�typerV�getverbosityrrr�<module>r�sD��*���
�����A�a��F�"�1������� ��X�C�C�X�Ei�Ei����0	��0v�r=�@�z����I�I�K�
!�#�(�(�1�2�,�
/�F��v���,�,�.�/�9���1��<�<���
�6�?�?�1�+=�u�?O�?O� P��
���3�q�c��D�����!3�4�5�Q�7�8�9�
�-�#�c�.�.�0�1�
1�2�r

Zerion Mini Shell 1.0