https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/duplicity/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/duplicity/__pycache__/log.cpython-310.pyc
o

��`[=�@s�dZddlmZddlmZddlmZddlZddlZddlZddl	Z	dZ
dZdZdZ
dZd	Zd	Zdad
add�Zd
d�Zdd�ZdJdd�Zdd�ZGdd�de�Zejdfdd�ZdKdd�Zdd�Zdd�Zd d!�ZdLd"d#�ZdLd$d%�Z d&d'�Z!Gd(d)�d)e�Z"e"jdfd*d+�Z#Gd,d-�d-e�Z$e$jdfd.d/�Z%e$jdfd0d1�Z&Gd2d3�d3ej'�Z(Gd4d5�d5ej'�Z)d6d7�Z*Gd8d9�d9ej+�Z,Gd:d;�d;ej+�Z-Gd<d=�d=ej+�Z.Gd>d?�d?ej'�Z/d@dA�Z0dBdC�Z1dDdE�Z2dFdG�Z3dHdI�Z4dS)Mz1Log various messages depending on verbosity level�)�division)�str)�objectN����	FcCst|dS)z[Convert duplicity level to the logging module's system, where higher is
        more severe�)�MAX��verb�r
�//usr/lib/python3/dist-packages/duplicity/log.py�DupToLoggerLevel.�rcCst|�S)zVConvert logging module level to duplicity's system, where lower is
        more severe)rrr
r
r�LoggerToDupLevel4srcCs4|dkrdS|dkrdS|dkrdS|dkrdSd	S)
Nr�DEBUGr�INFOr�NOTICEr	�WARNING�ERRORr
)�levelr
r
r�	LevelName:srr	cCs�|r	d||f}nd|}|sd}|rt��}t�tt��t|t�s)|�dd�}tjt|�|t	|�||d�d�|rBt�|�dSdS)	z/Write s to stderr if verbosity level low enoughz%d %s�%d��utf8�replace)�	levelName�controlLine�transferProgress)�extraN)
�_logger�getEffectiveLevel�setLevelrr
�
isinstancer�decode�logr)�s�
verb_level�coder �force_print�transfer_progressr�
initial_levelr
r
r�LogGs&
���r-cC�t|t�dS)z.Shortcut used for debug message (verbosity 9).N)r-r�r'r
r
r�Debuge�r0c@sLeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdS)�InfoCodez�Enumeration class to hold info code values.
        These values should never change, as frontends rely upon them.
        Don't use 0 or negative numbers.r	rr�r����
���
���N)�__name__�
__module__�__qualname__�__doc__�generic�progress�collection_status�
diff_file_new�diff_file_changed�diff_file_deleted�patch_file_writing�patch_file_patching�	file_list�synchronous_upload_begin�asynchronous_upload_begin�synchronous_upload_done�asynchronous_upload_done�skipping_socket�upload_progressr
r
r
rr2js"r2cC�t|t||�dS)z.Shortcut used for info messages (verbosity 5).N)r-r�r'r)r r
r
r�Info��rScCs.|r	d||f}nd|}t|ttj|�dS)z2Shortcut used for progress messages (verbosity 5).z%d %drN)r-rr2rC)r'�current�totalrr
r
r�Progress�srWcCsVtj|d�}t|jd�\}}t|d�\}}d}|jdkr!d|j}d||||f}|S)N��seconds��<rrz%dd,z%s%02d:%02d:%02d��datetime�	timedelta�divmodrY�days��secs�tdelta�hours�rem�minutesrY�fmtr
r
r�_ElapsedSecs2Str�s

rhcCs
tj|d�}t|jd�\}}t|d�\}}d}|jdkr7d|j}|dkr+d||f}|dkr5d||f}|S|dkrKd	|}|dkrId||f}|S|d
krUd|}|S|dkrgd|}|dkred
|}|S|dkrod}|S|dkrwd}|S|dkrd}|Sd|}|S)NrXrZr[rrz%ddz%s %dhz%s %dminz%dhrz%dmin�z%s 30sec�-z< 1minz< 45secr<z< 30secz%dsecr\rar
r
r�_RemainingSecs2Str�sF

��
�	����rkc
Cs�td|�}t|�d}d}|dkr|d}d}|dkr"|d}d}|r+d}	d}
d	}n t|�}	t|�d}
d}|
dkrA|
d}
d}|
dkrK|
d}
d}d
||t|�|
|d|dd
|||	f	}d||||||f}
t|ttj|
dd�dS)z9Shortcut used for upload progress messages (verbosity 5).g�������?g�@�KBg@�@�MB�GBzStalled!r�Bz(%.1f%s %s [%.1f%s/s] [%s>%s] %d%% ETA %s�=� �(z%d %d %d %d %d %dT)r+N)�int�floatrkrhr-rr2rP)rC�eta�
changed_bytes�elapsed�speed�stalled�dots�data_amount�
data_scale�eta_str�speed_amount�speed_scaler'rr
r
r�TransferProgress�s>�r�c	Cs(tt|�dtjdd�|���|�dS)�%Prints a collection status to the logr6�
N)r-rr2rD�join�to_log_info)�	col_statsr*r
r
r�PrintCollectionStatus�s�r�cCs tt|�|��dtjd|�dS)r�r6N)r-r�get_file_changed_recordr2rD)r��filepathr*r
r
r� PrintCollectionFileChangedStatus�s r�cCr.)z=Shortcut used for notice messages (verbosity 3, the default).N)r-rr/r
r
r�Notice�r1r�c@sDeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdS)�WarningCodez�Enumeration class to hold warning code values.
        These values should never change, as frontends rely upon them.
        Don't use 0 or negative numbers.r	rrr3rr4r5r6rr7r8r9r:N)r>r?r@rArB�orphaned_sig�unnecessary_sig�
unmatched_sig�incomplete_backup�orphaned_backup�ftp_ncftp_v320�cannot_iterate�cannot_stat�cannot_read�no_sig_for_time�cannot_process�process_skippedr
r
r
rr��sr�cCrQ)z0Shortcut used for warning messages (verbosity 2)N)r-rrRr
r
r�WarnrTr�c@s�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7S)8�	ErrorCodeaEnumeration class to hold error code values.
        These values should never change, as frontends rely upon them.
        Don't use 0 or negative numbers.  This code is returned by duplicity
        to indicate which error occurred via both exit code and log.r	rrr3rr4r5r6rr7r8r9r:r;r<r=������������ri�� �!�"�#�$�%�&�'rr�*�+�,rj�.�/�0�1�2�3�4�5�6�7N)9r>r?r@rArB�command_line�hostname_mismatch�no_manifests�mismatched_manifests�unreadable_manifests�cant_open_filelist�bad_url�bad_archive_dir�bad_sign_key�restore_dir_exists�verify_dir_doesnt_exist�backup_dir_doesnt_exist�file_prefix_error�globbing_error�redundant_inclusion�inc_without_sigs�no_sigs�restore_dir_not_found�no_restore_files�mismatched_hash�unsigned_volume�
user_error�boto_old_style�boto_lib_too_old�boto_calling_format�ftp_ncftp_missing�ftp_ncftp_too_old�	exception�
gpg_failed�s3_bucket_not_style�not_implemented�get_freespace_failed�not_enough_freespace�get_ulimit_failed�maxopen_too_low�connection_failed�restart_file_not_found�gio_not_available�source_dir_mismatch�ftps_lftp_missing�volume_wrong_size�enryption_mismatch�pythonoptimize_set�dpbx_nologin�bad_request�s3_kms_no_id�
backend_error�backend_permission_denied�backend_not_found�backend_no_space�backend_command_error�backend_code_errorr
r
r
rr�snr�cCrQ)zWrite error messageN)r-rrRr
r
r�ErrorKrTr�cCs"t|t||�t�t�|�dS)z"Write fatal error message and exitN)r-r�shutdown�sys�exitrRr
r
r�
FatalErrorPsr�c@�eZdZdZdd�ZdS)�	OutFilterz:Filter that only allows warning or less important messagescCs|jo	|jtt�kS�N��msg�levelnorr��self�recordr
r
r�filterY�zOutFilter.filterN�r>r?r@rAr�r
r
r
rr�W�r�c@r�)�	ErrFilterz=Filter that only allows messages more important than warningscCs|jo	|jtt�kSr�r�r�r
r
rr�_r�zErrFilter.filterNrr
r
r
rr]rrcCs�trdSdtjdd�vrdat�d�att�t�tj	�}tr'|�
t��n|�
t��|�
t��t�|�t�tj�}trG|�
t��n|�
t��|�
t��t�|�dS)zInitialize loggingNz--log-timestampr	T�	duplicity)r!r��argv�_log_timestamp�logging�	getLogger�setverbosityr�
StreamHandler�stdout�setFormatter�DetailFormatter�PrettyProgressFormatter�	addFilterr��
addHandler�stderrr)�
outHandler�
errHandlerr
r
r�setupcs$

rc@s$eZdZdZdZdd�Zdd�ZdS)r
zCFormatter that overwrites previous progress lines on ANSI terminalsFcC�tj�|d�dS)Nz%(message)s�r�	Formatter�__init__�r�r
r
rr��z PrettyProgressFormatter.__init__cCs.tj�||�}|jr|jrd|}|j|_|S)Nz)rr�format�last_record_was_progressr�r�r�r'r
r
rr�s
zPrettyProgressFormatter.formatN)r>r?r@rArrrr
r
r
rr
�s
r
c@� eZdZdZdd�Zdd�ZdS)rzAFormatter that creates messages in a syntax somewhat like syslog.cCr)Nz%%(asctime)s %(levelName)s %(message)srrr
r
rr�rzDetailFormatter.__init__cCstj�||�}|Sr�)rrrrr
r
rr�szDetailFormatter.formatN�r>r?r@rArrr
r
r
rr��rc@r)�MachineFormatterzQFormatter that creates messages in a syntax easily consumable by other processes.cCr)Nz%(levelName)s %(controlLine)srrr
r
rr�rzMachineFormatter.__init__cCs2tj�||�}|jr|d|j�dd�7}|dS)Nr�z
. )rrr�messagerrr
r
rr�szMachineFormatter.formatNrr
r
r
rr �rr c@r�)�
MachineFilterzFFilter that only allows levels that are consumable by other processes.cCs
t|d�S)Nr)�hasattrr�r
r
rr��s
zMachineFilter.filterNrr
r
r
rr"�rr"cCs8t�t�|d��}|�t��|�t��t�	|�dS)z5Add stream to which to write machine-readable logging�wN)
rr	�os�fdopenrr rr"r!r)�fd�handlerr
r
r�add_fd�sr)cCs4tj|dd�}|�t��|�t��t�|�dS)z3Add file to which to write machine-readable loggingr)�encodingN)r�FileHandlerrr rr"r!r)�filenamer(r
r
r�add_file�sr-cCst�t|��dS)zSet the verbosity levelN)r!r#rrr
r
rr�srcCstt���S)zGet the verbosity level)rr!r"r
r
r
r�getverbosity�rr.cCst��dS)zCleanup and flush loggersN)rr�r
r
r
rr��rr�)r	NFFr�)F)5rA�
__future__r�builtinsrrr]rr%r��MINrrrrrr
r!rrrrr-r0r2rBrSrWrhrkr�r�r�r�r�r�r�r�r��Filterr�rrrr
rr r"r)r-rr.r�r
r
r
r�<module>s`


	 
%
E$		

https://t.me/RX1948 - 2025