HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/apport/__pycache__/__init__.cpython-312.pyc
�

j�8d���j�ddlZddlZddlZddlmZddlmZeeddlZd�Z	d
d�Z
d�Zd�Zd�Z
d	�Zy)�N)�Report)�implc�r�tj|�}t|t�r|jd�S|S)NzUTF-8)�gettext�
isinstance�bytes�decode)�str�transs  �1/usr/lib/python3/dist-packages/apport/__init__.py�unicode_gettextr
s.���O�O�C� �E��%����|�|�G�$�$���c��|r5tjjdtjd�z�t|�y)z>Log the given string to stdout. Prepend timestamp if requestedz%s: z%x %XN)�sys�stdout�write�time�strftime�print)�message�	timestamps  r�logrs.����
�
����$�-�-��"8�8�9�	�'�Nrc�F�t|g|���tjd�y)z0Print out an error message and exit the program.�N)�errorr�exit��msg�argss  r�fatalr  s��
�#�����H�H�Q�Krc���tjratjjd�tjj||z�tjjd�yy)zPrint out an error message.zERROR: �
N�r�stderrrrs  rrr'sJ���z�z��
�
����#��
�
����t��$��
�
�����rc���tjratjjd�tjj||z�tjjd�yy)zPrint out an warning message.z	WARNING: r"Nr#rs  r�warningr&0sJ���z�z��
�
����%��
�
����t��$��
�
�����rc�p�dtjvstjsyi}t	d�5}|D]<}|jd�s�|j
�\}}}t|�dz||dd<�>	ddd�tjjd|d|d	|d
|fz�y#1swY�9xYw)zSPrint current memory usage.

    This is only done if $APPORT_MEMDEBUG is set.
    �APPORT_MEMDEBUGNz/proc/self/status�Vmg�@���z/Size: %.1f MB, RSS: %.1f MB, Stk: %.1f MB @ %s
�VmSize�VmRSS�VmStk)	�os�environrr$�open�
startswith�split�intr)�
checkpoint�memstat�f�line�field�size�units       r�memdbgr;9s���
��
�
�*�#�*�*���G�	
�!�	"�a��D����t�$�&*�j�j�l�#���d�&)�$�i�%�&7���c�r�
�#��
#��J�J���G��h�'���)9�7�7�;K�Z�X�Y�Z�

#�	"�s�B,�	*B,�,B5)F)rr.r�
apport.reportr�apport.packaging_implr�	packagingrr
rr rr&r;�rr�<module>r@s>��
�	�� �3��	�������Zr