__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

x6�g���	��SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
 SSKJr
 Sr"SS5rSS\S-S	\S-S
\S-S\4SjjrS
rg)z"Abstract crash database interface.�N)�Any)�implc�T�[U[5(aURSS5$U$)z.Convert str to an unicode if it isn't already.�UTF-8�ignore)�
isinstance�bytes�decode)�strings �0/usr/lib/python3/dist-packages/apport/crashdb.py�_ur
s%���&�%� � ��}�}�W�h�/�/��M�c�$�\rSrSrSrSrSrSrSrS+Sjr	S	r
S
rSrSr
S
rSrSrSrS,SjrSrSrSr\S5rS-SjrSrSrSrS.SjrS/SjrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&S%r'S&r(S'r)S+S(jr*S)r+S*r,g)0�
CrashDatabase�"zCrash database interface.c�8�XlX lSUlSUlg)aJInitialize crash database connection.

You need to specify an implementation specific file with the
authentication credentials for retracing access for download() and
update(). For upload() and get_comment_url() you can use None.

options is a dictionary with additional settings from crashdb.conf; see
get_crashdb() for details.
N)�	auth_file�options�duplicate_db�format_version)�selfrrs   r�__init__�CrashDatabase.__init__'s��#���� ���"��rc�8�URRS5$)z�Return the base URL for bug patterns.

See apport.report.Report.search_bug_patterns() for details. If this
function returns None, bug patterns are disabled.
�bug_pattern_url�r�get�rs r�get_bugpattern_baseurl�$CrashDatabase.get_bugpattern_baseurl6s���|�|��� 1�2�2rc�f�SUR;a!URS5URS;$g)z�Check if this report can be uploaded to this database.

Crash databases might limit the types of reports they get with e. g.
the "problem_types" option.
�
problem_types�ProblemTypeTr)r�reports  r�accepts�CrashDatabase.accepts>s0���d�l�l�*��:�:�m�,����_�0M�M�M�rc�d�SSKnURS:XdS5eSUl[RRU5(+=(d. US:H=(d" [RR
U5S:HnURUSS9UlU(a�URR5nURS	5 URS
UR/5 URS5 URS5 URR5 URR5nURS
5 UR5nUS/:wa[SU35eURS5 UR5nUSUR:�a[SUS35eUSUR:a3[#SUSSUR35 UR%US5 gg!URRanS[!U5;aS/nSnAN�SnAff=f)zpInitialize duplicate database.

path specifies an SQLite database. It will be created if it does not
exist yet.
rN�qmarkz/this module assumes qmark dbapi parameter style�z:memory:i )�timeoutz.CREATE TABLE version (format INTEGER NOT NULL)zINSERT INTO version VALUES (?)aCREATE TABLE crashes (
                signature VARCHAR(255) NOT NULL,
                crash_id INTEGER NOT NULL,
                fixed_version VARCHAR(50),
                last_change TIMESTAMP,
                CONSTRAINT crashes_pk PRIMARY KEY (crash_id))z�CREATE TABLE address_signatures (
                signature VARCHAR(1000) NOT NULL,
                crash_id INTEGER NOT NULL,
                CONSTRAINT address_signatures_pk PRIMARY KEY (signature))zPRAGMA integrity_check)�okzCorrupt duplicate db:zSELECT format FROM versionz
no such tablez duplicate DB has unknown format zduplicate db has format z, upgrading to )�sqlite3�
paramstyler�os�path�exists�getsize�connectr�cursor�execute�commit�fetchall�SystemError�fetchone�OperationalError�str�print�_duplicate_db_upgrade)rr/�dbapi2�init�cur�result�errors       r�init_duplicate_db�CrashDatabase.init_duplicate_dbNs��	!�
����(�	=�<�	=�(� ��������t�$�$�X��
�(:�X�b�g�g�o�o�d�>S�WX�>X�	
�#�N�N�4��N�>�����#�#�*�*�,�C��K�K�H�I��K�K�8�4�;N�;N�:O�P��K�K�A�
�
�K�K�M�
�
���$�$�&����&�&�(�����,�-�������g�Y��� 5�f�X�>�?�?�	��K�K�4�5��\�\�^�F�
�!�9�t�*�*�*�� @�����L�M�M��!�9�t�*�*�*��*�6�!�9�+�6!�!%�!4�!4� 5�7�
�
�&�&�v�a�y�1�+��
� � �1�1�	��#�e�*�,������	�s�-!G9�9H/�H*�*H/Nc�(�UR(dS5eU(dURU5nURX5 SU;aUSnOUR5n/nU(aEUR	X15nU(a-UHupVURU5 M UR	X15nUSR
5SnSnSn	UH3upZU
(a#U(a[R"Xz5S:dM/UnU
n	 O  U(aURXSS5 UR5nU(asURU5nU(a[X�:waVUcUnOPX�:a$URX,U5 URX�5 O'URX(U5 URX�5 UnSn	Ub2X�:wa-U(aUR!X�5 URX!U5 X�4$U(a~URR#5n
U
R%SU/5 U
R'5SnUS:Xa8U
R%S	[)U5US45 URR+5 U(aUR!X�5 g![[4a SnGN�f=f)
a�Check whether a crash is already known.

If the crash is new, it will be added to the duplicate database and the
function returns None. If the crash is already known, the function
returns a pair (crash_id, fixed_version), where fixed_version might be
None if the crash is not fixed in the latest version yet. Depending on
whether the version in report is smaller than/equal to the fixed
version or larger, this calls close_duplicate() or mark_regression().

If the report does not have a valid crash signature, this function does
nothing and just returns None.

By default, the report gets download()ed, but for performance reasons
it can be explicitly passed to this function if it is already
available.
�-init_duplicate_db() needs to be called before�DuplicateSignature�Package�Nr���z0SELECT count(*) FROM crashes WHERE crash_id == ?z7INSERT INTO crashes VALUES (?, ?, ?, CURRENT_TIMESTAMP))r�download�_mark_dup_checked�crash_signature�_duplicate_search_signature�_duplicate_db_sync_status�split�KeyError�
IndexError�	packaging�compare_versions�mark_regression�crash_signature_addresses�#_duplicate_search_address_signature�close_duplicate�_duplicate_db_merge_id�#_duplicate_db_add_address_signaturer3r4r8r
r5)r�crash_idr$�sig�existing�ex_id�_�report_package_version�	master_id�
master_ver�ex_ver�addr_sig�
addr_matchr?�count_ids               r�check_duplicate�CrashDatabase.check_duplicate�su��&� � �Q�"Q�Q� ���]�]�8�,�F����x�0��6�)��-�.�C��(�(�*�C�����7�7��F�H�� (�H�E��2�2�5�9�!)��;�;�C�J��	*�%+�I�%6�%<�%<�%>�q�%A�"��	��
�%�M�E��-��-�-�.D�M�PQ�Q�!�	�#�
��&���$�$�X��|�A��?�
�3�3�5����A�A�(�K�J��j�5��$�!+�I�
�+��(�(��Y�G��/�/�
�F��(�(��J�G��/�/�	�F� *�I�!%�J�� �Y�%:���8�8��M�� � ��9�=��*�*���#�#�*�*�,�C��K�K�J�X�J�W��|�|�~�a�(�H��1�}����M���W�h��-���!�!�(�(�*���4�4�X�H���K�*�%�	*�%)�"�	*�s�-I;�;J�Jc�`�URRS5(dgSGHRnUS:XaSU;aUSnO!UR5nOUR5nU(dM@UR	U5nU(d g[
RRURSU[RRU55n[RRU5nUR5RS5nSSS5 SW;aM�UR!5HHnUR#SS5up�[%U	5n	X�:XdM*UR)X5nU(dS	nUs s $ GMU g!,(df   Ny=f![a GMwf=f![&a M�f=f)
a>Check if the crash db already knows about the crash signature.

Check if the report has a DuplicateSignature, crash_signature(), or
StacktraceAddressSignature, and ask the database whether the problem is
already known. If so, return an URL where the user can check the status
or subscribe (if available), or just return True if the report is known
but there is no public URL. In that case the report will not be
uploaded (i. e. upload() will not be called).

Return None if the report does not have any signature or the crash
database does not support checking for duplicates on the client side.

The default implementation uses a text file format generated by
duplicate_db_publish() at an URL specified by the "dupdb_url" option.
Subclasses are free to override this with a custom implementation, such
as a real database lookup.
�	dupdb_urlN)r[�addressr[rFrz<title>404 Not FoundrH�1)rrrLrU�duplicate_sig_hashr.r/�join�urllib�parse�
quote_plus�request�urlopen�readr
�OSError�
splitlinesrO�int�
ValueError�
get_id_url)rr$�kindr[�h�urlri�contents�linerZ�sr@s            r�known�CrashDatabase.knowns��(�|�|����,�,��&�D��u�}�'�6�1� �!5�6�C� �0�0�2�C��6�6�8�����'�'��,�A���
�'�'�,�,����[�)�4����1H�1H��1K��C�

��^�^�+�+�C�0�I�(�~�~�/�6�6�w�?�H�1�)�X�5��6�!�+�+�-���"&�*�*�T�1�"5�K�H�"�8�}�H��8�!�_�_�V�>�F�!�!$��!�M�.�I'�b�-1�0���
��
��"����s<�
F
�) E<�	F
�.F�<
F
	�F
�
F�F�
F-�,F-c���UR(dS5eURR5nURSX!45nURS:XdeURR	5 g)z�Mark given crash ID as fixed in the duplicate database.

version specifies the package version the crash was fixed in (None for
'still unfixed').
rEzXUPDATE crashes SET fixed_version = ?, last_change = CURRENT_TIMESTAMP WHERE crash_id = ?rHN)rr3r4�rowcountr5)rrZ�versionr?�ns     r�duplicate_db_fixed� CrashDatabase.duplicate_db_fixedKsl��� � �Q�"Q�Q� ����&�&�(���K�K�
!���	
���z�z�Q������� � �"rc���UR(dS5eURR5nURSU/5 URSU/5 URR5 g)zkRemove crash from the duplicate database.

This happens when a report got rejected or manually duplicated.
rE�&DELETE FROM crashes WHERE crash_id = ?z1DELETE FROM address_signatures WHERE crash_id = ?N�rr3r4r5)rrZr?s   r�duplicate_db_remove�!CrashDatabase.duplicate_db_remove]sa��
� � �Q�"Q�Q� ����&�&�(�����<�x�j�I����G�(��T���� � �"rc���UR(dS5eURR5nURSX!/5 URSX!/5 URR5 g)zChange a crash ID.rEzSUPDATE crashes SET crash_id = ?, last_change = CURRENT_TIMESTAMP WHERE crash_id = ?�=UPDATE address_signatures SET crash_id = ? WHERE crash_id = ?Nr�)r�old_id�new_idr?s    r�duplicate_db_change_master_id�+CrashDatabase.duplicate_db_change_master_idiso��� � �Q�"Q�Q� ����&�&�(�����
!���		
�	���K�
��	
�	
��� � �"rc��UR(dS5eUS3n[R"U5 [RR	US5n[R"U5 SnSnURR5nUR
S5 UR5HxupxURU5n	U	cMX�:waAU	nU(aUR5 [[RR	X45SSS9nURUS	US
35 Mz U(aUR5 [RR	US5n
[R"U
5 SnSnUR
S5 UR5H�upxURU5n	U	cMX�:waBU	nU(aUR5 [[RR	X�5S
5nURUS	US
3RS55 M� U(aUR5 [RRU5(a[R"XS35 [R"X!5 [RRUS35(a[R "US35 gg)aoCreate text files suitable for www publishing.

Create a number of text files in the given directory which Apport
clients can use to determine whether a problem is already reported to
the database, through the known() method. This directory is suitable
for publishing to the web.

The database is indexed by the first two fields of the duplicate or
crash signature, to avoid having to download the entire database every
time.

If the directory already exists, it will be updated. The new content is
built in a new directory which is the given one with ".new" appended,
then moved to the given name in an almost atomic way.
rEz.newrjNz3SELECT * from address_signatures ORDER BY signature�w�utf-8��encoding� �
r[z:SELECT signature, crash_id from crashes ORDER BY signature�wbrz.old)rr.�mkdirr/rmr3r4r6rl�close�open�write�encoder0�rename�shutil�rmtree)r�publish_dir�out�	addr_base�cur_hash�cur_filer?r[rZrz�sig_bases           r�duplicate_db_publish�"CrashDatabase.duplicate_db_publishzs4��"� � �Q�"Q�Q� ��
�T�"��
����
��G�G�L�L��i�0�	�
������������&�&�(�����I�J� �\�\�^�M�C��'�'��,�A��y���}�����N�N�$���G�G�L�L��5�s�W���
�N�N�h�Z�q���R�0�1�,���N�N���7�7�<�<��U�+��
������������P�Q� �\�\�^�M�C��'�'��,�A��y���}�����N�N�$�������X� @�$�G���N�N�h�Z�q���R�0�7�7��@�A�,���N�N���7�7�>�>�+�&�&��I�I�k�]�$�#7�8�
�	�	�#�#�
�7�7�>�>�[�M��.�/�/��M�M�[�M��.�/�0rc���US:a[S5eURR5nURSU45 URR	5 XR
:Xdeg)z#Upgrade database to current format.r)z2Cannot upgrade database from format earlier than 3zUPDATE version SET format = ?N)r7rr3r4r5r)r�
cur_formatr?s   rr<�#CrashDatabase._duplicate_db_upgrade�s`����>��R�S�S����&�&�(�����3�j�]�C���� � �"��0�0�0�0�0rc���URR5nURS[U5U/5 UR	5nSnUR[R"U5S9 U$)a�Look up signature in the duplicate db.

Return [(crash_id, fixed_version)] tuple list.

There might be several matches if a crash has been reintroduced in a
later version. The results are sorted so that the highest fixed version
comes first, and "unfixed" being the last result.

id is the bug we are looking to find a duplicate for. The result will
never contain id, to avoid marking a bug as a duplicate of itself if a
bug is reprocessed more than once.
zQSELECT crash_id, fixed_version FROM crashes WHERE signature = ? AND crash_id <> ?c�t�USnUSnX:XagU(dUbgU(dg[R"X5$)NrHrrI)rRrS)�x�ys  r�cmp�6CrashDatabase._duplicate_search_signature.<locals>.cmp�s=���!��A��!��A��v���������-�-�a�3�3r)�key)rr3r4r
r6�sort�	functools�
cmp_to_key)rr[rZr?r\r�s      rrM�)CrashDatabase._duplicate_search_signature�sg�����&�&�(�����
4�
��W�h��	
�
�<�<�>��		4�	�
�
�)�.�.�s�3�
�4��rc���U(dgURR5nURSU/5 UR5n[	U5S::deU(aUSS$g)zMReturn ID for crash address signature.

Return None if signature is unknown.
Nz<SELECT crash_id FROM address_signatures WHERE signature == ?rHr)rr3r4r6�len)rr[r?�existing_idss    rrV�1CrashDatabase._duplicate_search_address_signature�sf��
�����&�&�(�����J�S�E�	
��|�|�~���<� �A�%�%�%����?�1�%�%�rc���UR(dS5e0nURR5nURS5 UHupEpgU(aXVU4X$'MXV4X$'M U$)a)Return the entire duplicate database as a dictionary.

The returned dictionary maps "signature" to (crash_id, fixed_version)
pairs.

If with_timestamps is True, then the map will contain triples
(crash_id, fixed_version, last_change) instead.

This is mainly useful for debugging and test suites.
rEzSELECT * FROM crashes)rr3r4)r�with_timestamps�dumpr?r[rZ�ver�last_changes        r�duplicate_db_dump�CrashDatabase.duplicate_db_dumpsm��� � �Q�"Q�Q� ������&�&�(�����+�,�/2�+�C�3��%�K�8��	�%�O��	�	03�
�rc��UR(dS5eURR5nURSU/5 UR5nU(dgUSnUR	U5nUS:Xa![SUS35 UR
U5 gU(d+U(a$[SUSUS	35 URX5 gU(a-U(d%[SUS
US35 URUS5 ggg)z�Update the duplicate db to the reality of the report in the
crash db.

This uses get_fixed_version() to get the status of the given crash.
An invalid ID gets removed from the duplicate db, and a crash which got
fixed is marked as such in the database.
rEz4SELECT fixed_version FROM crashes WHERE crash_id = ?Nr�invalidzDEBUG: bug z( was invalidated, removing from databasez got fixed in version z, updating databasez& got reopened, dropping fixed version z from database)rr3r4r8�get_fixed_versionr;r�r�)rrZr?�db_fixed_version�real_fixed_versions     rrN�'CrashDatabase._duplicate_db_sync_status's��� � �Q�"Q�Q� ����&�&�(�����J�X�J�W��<�<�>����+�A�.��!�3�3�H�=����*��K��z�)Q�R�S��$�$�X�.�� �$6���h�Z�(�1�2�2E�G�
�
�#�#�H�A���$6���h�Z�(+�+;�*<�N�L�
�
�#�#�H�d�3��
%7�rc�
�URU5nU(aX2:wa[SUSUSU35egURR5nUR	S[U5U45 URR
5 g)NzID z has signature z1, but database already has that signature for ID z,INSERT INTO address_signatures VALUES (?, ?))rVr7rr3r4r
r5)rr[rZr\r?s     rrY�1CrashDatabase._duplicate_db_add_address_signatureRs����;�;�C�@����#�!��(��?�3�%�8:�:B��E���$��#�#�*�*�,�C��K�K�>��C��(�@S�
�
���$�$�&rc���UR(dS5eURR5nURSU/5 URSX!/5 URR5 g)zwMerge two crash IDs.

This is necessary when having to mark a bug as a duplicate if it
already is in the duplicate DB.
rEr�r�Nr�)r�dup�masterr?s    rrX�$CrashDatabase._duplicate_db_merge_idbsf��� � �Q�"Q�Q� ����&�&�(�����<�s�e�D����K�
�M�	
�	
��� � �"rc��SU;agURSS5SnSRURSS5SS5nURS	S5n[RRUR
S
55nUSSnU$)z6Create a www/URL proof hash for a duplicate signature.r�Nr�rHrr^�:��/r��)rOrm�replacernrorpr�)r[�is  rrl� CrashDatabase.duplicate_sig_hashrs����3�;��
�I�I�c�1��a� ��
�H�H�Q�W�W�S�!�_�R�a�(�)��
�I�I�c�3����L�L�#�#�A�H�H�W�$5�6��
�d�s�G���rc��[S5e)aDUpload given problem report return a handle for it.

This should happen noninteractively.

If the implementation supports it, and a function progress_callback is
passed, that is called repeatedly with two arguments: the number of
bytes already sent, and the total number of bytes to send. This can be
used to provide a proper upload progress indication on frontends.

Implementations ought to "assert self.accepts(report)". The UI logic
already prevents uploading a report to a database which does not accept
it, but for third-party users of the API this should still be checked.
�6this method must be implemented by a concrete subclass��NotImplementedError)rr$�progress_callback�user_message_callbacks    r�upload�CrashDatabase.upload�s��"�D�
�	
rc��[S5e)aReturn 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.
r�r�)rr$�handles   r�get_comment_url�CrashDatabase.get_comment_url����"�D�
�	
rc��[S5e)z�Return URL for a given report ID.

The report is passed in case building the URL needs additional
information from it, such as the SourcePackage name.

Return None if URL is not available or cannot be determined.
r�r�)rr$rZs   rrx�CrashDatabase.get_id_url�r�rc��[S5e)z>Download the problem report from given ID and return a Report.r�r��rrZs  rrJ�CrashDatabase.download����!�D�
�	
rc��[S5e)aUpdate the given report ID with all data from report.

This creates a text comment with the "short" data (see
ProblemReport.write_mime()), and creates attachments for all the
bulk/binary data.

If change_description is True, and the crash db implementation supports
it, the short data will be put into the description instead (like in a
new bug).

comment will be added to the "short" data. If attachment_comment is
given, it will be added to the attachment uploads.

If key_filter is a list or set, then only those keys will be added.
r�r�)rrZr$�comment�change_description�attachment_comment�
key_filters       r�update�CrashDatabase.update�s��0"�D�
�	
rc�,�URUUU/SQS9 g)z�Update the given report ID for retracing results.

This updates Stacktrace, ThreadStacktrace, StacktraceTop,
and StacktraceSource. You can also supply an additional comment.
)�
Stacktrace�ThreadStacktrace�StacktraceSource�
StacktraceTop)r�N)r�)rrZr$r�s    r�
update_traces�CrashDatabase.update_traces�s#��	
�������		�
	
rc��[S5e)z2Get 'DistroRelease: <release>' from the report ID.r�r�r�s  r�get_distro_release� CrashDatabase.get_distro_release�r�rc��[S5e)z�Return set of crash IDs which have not been retraced yet.

This should only include crashes which match the current host
architecture.
r�r�rs r�get_unretraced�CrashDatabase.get_unretraced�s��"�D�
�	
rc��[S5e)z�Return set of crash IDs which need duplicate checking.

This is mainly useful for crashes of scripting languages such as
Python, since they do not need to be retraced. It should not return
bugs that are covered by get_unretraced().
r�r�rs r�get_dup_unchecked�CrashDatabase.get_dup_unchecked�s��"�D�
�	
rc��[S5e)a0Return an ID set of all crashes which are not yet fixed.

The list must not contain bugs which were rejected or duplicate.

This function should make sure that the returned list is correct. If
there are any errors with connecting to the crash database, it should
raise an exception (preferably OSError).
r�r�rs r�get_unfixed�CrashDatabase.get_unfixeds��"�D�
�	
rc��[S5e)a�Return the package version that fixes a given crash.

Return None if the crash is not yet fixed, or an empty string if the
crash is fixed, but it cannot be determined by which version. Return
'invalid' if the crash report got invalidated, such as closed a
duplicate or rejected.

This function should make sure that the returned result is correct. If
there are any errors with connecting to the crash database, it should
raise an exception (preferably OSError).
r�r�r�s  rr��CrashDatabase.get_fixed_versions��"�D�
�	
rc��[S5e)z5Return list of affected source packages for given ID.r�r�r�s  r�get_affected_packages�#CrashDatabase.get_affected_packages r�rc��[S5e)z3Check whether the user is the reporter of given ID.r�r�r�s  r�is_reporter�CrashDatabase.is_reporter&r�rc��[S5e)aCheck whether the user is eligible to update a report.

A user should add additional information to an existing ID if (s)he is
the reporter or subscribed, the bug is open, not a duplicate, etc. The
exact policy and checks should be done according to  the particular
implementation.
r�r�r�s  r�
can_update�CrashDatabase.can_update,r�rc��[S5e)zSReturn master ID for a duplicate bug.

If the bug is not a duplicate, return None.
r�r�r�s  r�duplicate_of�CrashDatabase.duplicate_of8���
"�D�
�	
rc��[S5e)z\Mark a crash id as duplicate of given master ID.

If master is None, id gets un-duplicated.
r�r�)rr$rZr`s    rrW�CrashDatabase.close_duplicateArrc��[S5e)ziMark a crash id as reintroducing an earlier crash which is
already marked as fixed (having ID 'master').
r�r�)rrZr�s   rrT�CrashDatabase.mark_regressionJs��"�D�
�	
rc��[S5e)zMark crash id as retraced.r�r�r�s  r�
mark_retraced�CrashDatabase.mark_retracedRr�rc��[S5e)z�Mark crash id as 'failed to retrace'.

If invalid_msg is given, the bug should be closed as invalid with given
message, otherwise just marked as a failed retrace.

This can be a no-op if you are not interested in this.
r�r�)rrZ�invalid_msgs   r�mark_retrace_failed�!CrashDatabase.mark_retrace_failedXr�rc��[S5e)ztMark crash id as checked for being a duplicate.

This is an internal method that should not be called from outside.
r�r�)rrZr$s   rrK�CrashDatabase._mark_dup_checkeddrr)rrrr)N)F�NN)FNN)�)-�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr%rBrfrr�r�r�r�r<rMrVr�rNrYrX�staticmethodrlr�r�rxrJr�r�r�r�r�rr�rr
r
rrWrTrrrK�__static_attributes__�rrrr"s���#�
#�3�	� ?2�Bp�dH�T#�$
#�#�"O0�b1�"�H�&�.)�V'� #� ����,
�$

�

�
�!���
�8
�$
�
�	
�
�
� 
�
�

�
�
�
�
�

�
rrr�name�conf�returnc	��Uc [RRSS5nU(de0n[USS9n[	[UR
5US5U5 SSS5 US3n[RRU5(a�[R"U5H�n[RRXV5n[RRU5(dMHURS5(dM`[USS9n[	[UR
5US5US	5 SSS5 M� U(dUS
n[#XS	U5$!,(df   GN=f!,(df   M�=f![a2n[RR!S
USUS35 SnAGMSnAff=f)aReturn a CrashDatabase object for the given crash db name.

This reads the configuration file 'conf'.

If name is None, it defaults to the 'default' value in conf.

If conf is None, it defaults to the environment variable
APPORT_CRASHDB_CONF; if that does not exist, the hardcoded default is
/etc/apport/crashdb.conf. This Python syntax file needs to specify:

- A string variable 'default', giving a default value for 'name' if that is
  None.

- A dictionary 'databases' which maps names to crash db configuration
  dictionaries. These need to have at least the key 'impl' (Python module
  in apport.crashdb_impl which contains a concrete 'CrashDatabase' class
  implementation for that crash db type). Other generally known options are
  'bug_pattern_url', 'dupdb_url', and 'problem_types'.
N�APPORT_CRASHDB_CONFz/etc/apport/crashdb.confr�r��execz.dz.conf�	databasesz
Invalid file z: r��default)r.�environrr�r/�compilersr/�isdir�listdirrm�isfile�endswith�	Exception�sys�stderrr��load_crashdb)	rr*r+�settings�f�confdDir�cf�cfpathrAs	         r�get_crashdbrAss`��,�|��z�z�~�~�3�5O�P���K�4�!�H�	
�d�W�	%���W�Q�V�V�X�t�V�
,�h�7�
&�
��r�{�H�	�w�w�}�}�X����*�*�X�&�B��W�W�\�\�(�/�F��w�w�~�~�f�%�%�"�+�+�g�*>�*>�J��f�w�7�1��W�Q�V�V�X�v�v�>���@U�V�8�7�	'���	�"���	�K�#8��#>�?�?�+
&�	%��8�7��!�J��J�J�$�$�}�V�H�B�u�g�R�%H�I�I��J�sA�&E#�
F�)E5�:F�#
E2�5
F	�?F�F�
G�&F>�>Gc�n�[SUS3[5[5S/5nURX5$)z�Return a CrashDatabase object for a given DB specification.

spec is a crash db configuration dictionary as described in get_crashdb().
zapport.crashdb_impl.rr)�
__import__�globals�localsr)r�spec�ms   rr;r;�s:��
	�
�t�F�|�n�-�w�y�&�(�_�DU�	�A�
�?�?�9�+�+rr )r&r�r.r�r9�urllib.errorrn�urllib.parse�urllib.request�typingr�apport.packaging_implrrRr
rr:rAr;r)rr�<module>rMsz��(��	�
�
�����3��I

�I

�dHL�/@��T�z�/@�!$�t��/@�:=��*�/@��/@�d,r

Filemanager

Name Type Size Permission Actions
REThread.cpython-313.pyc File 2.85 KB 0644
__init__.cpython-313.pyc File 954 B 0644
crashdb.cpython-313.pyc File 34.04 KB 0644
fileutils.cpython-313.pyc File 31.92 KB 0644
hookutils.cpython-313.pyc File 47.15 KB 0644
logging.cpython-313.pyc File 2.97 KB 0644
packaging.cpython-313.pyc File 14.2 KB 0644
report.cpython-313.pyc File 82.55 KB 0644
sandboxutils.cpython-313.pyc File 12.43 KB 0644
ui.cpython-313.pyc File 87.14 KB 0644
user_group.cpython-313.pyc File 1.81 KB 0644
Filemanager