%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/duplicity/__pycache__/ |
| Current File : //lib/python3/dist-packages/duplicity/__pycache__/util.cpython-312.pyc |
�
�2e�% � �< � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZ ddlm
Z
ddlmZ dd�Zd� Zd� Zd� Zd � Z G d
� de� Z G d� d
e� Zd� Zd� Zd� Zej8 d� � Zdd�Zd� Zd� Z d� Z!d� Z" G d� dejF � Z$y)z
Miscellaneous utilities.
� N)�StringIO)�tarfilec � � t j � \ }}}t j || � }|j t j
||� � d}|t j d|dd � d�d|d ��z }|S )zx
@return A string representation in typical Python format of the
currently active/raised exception.
zTraceback (innermost last):
� N����20� )�sys�exc_info� traceback� format_tb�extend�format_exception_only�str�join)�limit�type�value�tb�lines�msgs �0/usr/lib/python3/dist-packages/duplicity/util.py�exception_tracebackr ( sn � �
�l�l�n�O�D�%������E�*�E� �L�L��0�0��u�=�>�
)�C�
�c�h�h�r�5��"�:�6��b� �B�
B�C��J� c � � t j | � j dd� } d| j dd� j dd� z S )zIConvert a (bytes) filename to a format suitable for logging (quoted utf8)zunicode-escape�replacez'%s'�utf8�'z\x27)�os�fsdecode�encode�decoder )�strings r �escaper$ 8 sA � �
�[�[��
�
'�
'�(8�)�
D�F��F�M�M�&�)�4�<�<�S�'�J�J�Jr c � � | r=t j j t t t j
| � � � S y)z@Convert an index (a tuple of path parts) to unicode for printing�.)r �pathr �list�mapr )�indexs r �uindexr+ >