403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/apport/crashdb_impl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/apport/crashdb_impl/__pycache__/memory.cpython-314.pyc
+
e��i?.��l�Rt^RIt^RIHt^RIt^RIt!RR]PP4tR#)zISimple in-memory CrashDatabase implementation, mainly useful for testing.N)�Anyc�ha�]tRt^toRtV3RlRltR)RltRtRtRt	V3R	lR
lt
V3RlRltV3R
lRltR*Rlt
V3RlRltV3RlRltV3RlRltV3RlRltRtV3RlRltRtV3RlRltR+V3RlRlltV3R lR!ltV3R"lR#ltV3R$lR%ltV3R&lR'ltR(tVtR#),�
CrashDatabasez�Simple implementation of crash database interface which keeps everything
in memory.

This is mainly useful for testing and debugging.
c�N<�V^8�dQhRS[R,RS[S[S[3,RR/#)��	auth_fileN�options�return)�str�dictr)�format�
__classdict__s"��</usr/lib/python3/dist-packages/apport/crashdb_impl/memory.py�__annotate__�CrashDatabase.__annotate__s.���#�#�#��*�#�t�C��H�~�#�$�#�c���\PPPWV4.Vn\4Vn\4VnRVnRVn	RV9dVP4R#R#)zdInitialize crash database connection.

This class does not support bug patterns and authentication.
gN�sample_data)�apport�crashdbr�__init__�reports�set�
unretraced�
dup_unchecked�upload_delay�
upload_msg�add_sample_data)�selfrrs&&&rr�CrashDatabase.__init__sb��
	���$�$�-�-�d�w�G�.0���$'�E���'*�u������26����G�#�� � �"�$rNc
�d�VPV4'gQhV'd>VP'd,V!VP^,VP^,4VPPRVRRRRRR/4\	VP4^,
pRV9dVP
P
V4MVPP
V4VP'dCV'd
V!^^d4\P!VP4V'd
V!^d^d4V#)zuStore the report and return a handle number (starting from 0).

This does not support (nor need) progress callbacks.
�report�
fixed_versionN�dup_of�comment��	Traceback)�acceptsrr�append�lenr�addrr�time�sleep)rr!�progress_callback�user_message_callback�crash_ids&&&& r�upload�CrashDatabase.upload-s���
�|�|�F�#�#�#�#� �T�_�_�_�!�$�/�/�!�"4�d�o�o�a�6H�I������
�v���h��i�QS�T�	
��t�|�|�$�q�(���&� ����"�"�8�,��O�O����)����� �!�!�S�)��J�J�t�(�(�)� �!�#�s�+��rc�8�RV9dRVR,RV2#RV2#)z�Return http://<sourcepackage>.bugs.example.com/<handle> for package
bugs or http://bugs.example.com/<handle> for reports without a
SourcePackage.
�
SourcePackagezhttp://z.bugs.example.com/zhttp://bugs.example.com/�)rr!�handles&&&r�get_comment_url�CrashDatabase.get_comment_urlJs3��
�f�$��V�O�4�5�5G��x�P�P�)�&��2�2rc�$�VPW4#)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.
)r6)rr!r/s&&&r�
get_id_url�CrashDatabase.get_id_urlSs���#�#�F�5�5rc�6�VPV,R,#)z>Download the problem report from given ID and return a Report.r!�r�rr/s&&r�download�CrashDatabase.download]s���|�|�H�%�h�/�/rc�6<�V^8�dQhRS[RS[S[,/#�rr/r	)�int�listr
)rr
s"�rrras#���C�C�c�C�d�3�i�Crc�F�VPV,R,R,.#)z5Return list of affected source packages for given ID.r!r3r<r=s&&r�get_affected_packages�#CrashDatabase.get_affected_packagesas�����X�&�x�0��A�B�Brc�&<�V^8�dQhRS[RS[/#rA�rB�bool)rr
s"�rrres�����C��D�rc��R#)z3Check whether the user is the reporter of given ID.Tr4r=s&&r�is_reporter�CrashDatabase.is_reporteres��rc�&<�V^8�dQhRS[RS[/#rArH)rr
s"�rrris���*�*�3�*�4�*rc�$�VPV4#)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.
)rKr=s&&r�
can_update�CrashDatabase.can_updateis������)�)rc��VPV,pW7R&V'd&VFpW�9gKW(,VR,V&K	R#VR,PV4R#)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!N)r�update)	rr/r!r$�change_description�attachment_comment�
key_filter�r�fs	&&&&&&&  rrR�CrashDatabase.updatetsN��0
�L�L��"���)������;�%+�Y�A�h�K��N� �
�h�K���v�&rc�&<�V^8�dQhRS[RS[/#rA�rBr
)rr
s"�rrr�s���A�A�3�A�3�Arc�D�VPV,R,R,#)zFGet 'DistroRelease: <release>' from the given report ID and return
it.r!�
DistroReleaser<r=s&&r�get_distro_release� CrashDatabase.get_distro_release�s���|�|�H�%�h�/��@�@rc�0<�V^8�dQhRS[S[,/#�rr	�rrB)rr
s"�rrr�s�����S��X�rc��\4p\VP4F0wr#VR,eKVR,eKVPV4K2	V#)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")r�	enumeraterr*)r�result�ir!s&   r�get_unfixed�CrashDatabase.get_unfixed�sG�����"�4�<�<�0�I�A��h��'�F�?�,C�,K��
�
�1�
�1��
rc�4<�V^8�dQhRS[RS[R,/#�rr/r	NrZ)rr
s"�rrr�s�����#��#��*�rc��VPV,R,eR#VPV,R,# \dR#i;i)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#�invalidr")r�
IndexErrorr=s&&r�get_fixed_version�CrashDatabase.get_fixed_version�sD��	��|�|�H�%�h�/�;� ��<�<��)�/�:�:���	��	�s�:�:�A	�A	c�4<�V^8�dQhRS[RS[R,/#ri�rB)rr
s"�rrr�s���0�0�S�0�S�4�Z�0rc�6�VPV,R,#)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_of�s��
�|�|�H�%�h�/�/rc�0�W0PV,R&R#)z\Mark a crash id as duplicate of given master ID.

If master is None, id gets un-duplicated.
r#Nr<)rr!r/�	master_ids&&&&r�close_duplicate�CrashDatabase.close_duplicate�s��
,5���X��x�(rc�*<�V^8�dQhRS[RS[RR/#)rr/�masterr	Nrp)rr
s"�rrr�s'���V�V��V�S�V�T�Vrc�t�VPV,R,fQhRV2VPV,R&R#)ziMark a crash id as reintroducing an earlier crash which is
already marked as fixed (having ID 'master').
r"Nzregression, already fixed in #r$r<)rr/rys&&&r�mark_regression�CrashDatabase.mark_regression�s8���|�|�F�#�O�4�@�@�@�.L�V�H�,U����X��y�)rc�b�VPPV4R# \dR#i;i)z/Mark crash id as checked for being a duplicate.N)r�remove�KeyError)rr/r!s&&&r�_mark_dup_checked�CrashDatabase._mark_dup_checked�s-��	����%�%�h�/���	��	�s��.�.c�$<�V^8�dQhRS[RR/#rirp)rr
s"�rrr�s���)�)�c�)�d�)rc�<�VPPV4R#)zMark crash id as retraced.N)rr~r=s&&r�
mark_retraced�CrashDatabase.mark_retraced�s�������x�(rc�8<�V^8�dQhRS[RS[R,RR/#)rr/�invalid_msgNr	rZ)rr
s"�rrr�s)�������*-��*��	
�rc��R#)zdMark crash id as 'failed to retrace'.

This is a no-op since this crash DB is not interested in it.
Nr4)rr/r�s&&&r�mark_retrace_failed�!CrashDatabase.mark_retrace_failed�s�rc�0<�V^8�dQhRS[S[,/#r`ra)rr
s"�rrr�s������C��rc��VP#)zuReturn an ID set of all crashes which have not been retraced yet and
which happened on the current host architecture.)r�rs&r�get_unretraced�CrashDatabase.get_unretraced�s�����rc�0<�V^8�dQhRS[S[,/#r`ra)rr
s"�rrr�s���"�"�3�s�8�"rc��VP#)aReturn an ID set of all crashes which have not been checked for
being a duplicate.

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().
)rr�s&r�get_dup_unchecked�CrashDatabase.get_dup_unchecked�s���!�!�!rc� <�V^8�dQhRS[/#r`rp)rr
s"�rrr�s���%�%�3�%rc�:�\VP4^,
#)z0Return the ID of the most recently filed report.)r)rr�s&r�	latest_id�CrashDatabase.latest_id�s���4�<�<� �1�$�$rc�<�V^8�dQhRR/#)rr	Nr4)rr
s"�rrr�s���R�R��Rrc���\PP4pRVR&RVR&RVR&RVR&R	VR
&RVR&VPV4\PP4pR
VR&RVR&RVR&RVR&R	VR
&RVR&VPV4\PP4pRVR&RVR&RVR&RVR&RVR
&RVR&VPV4\PP4pRVR&RVR&RVR&RVR
&RVR&VPV4\PP4pRVR&RVR&RVR&RVR
&RVR&VPV4R#)zGAdd some sample crash reports.

This is mostly useful for test suites.
z
libfoo1 1.2-3�Package�foor3z
FooLinux Pi/2r\�11�Signalz
/bin/crash�ExecutablePathz�foo_bar (x=1) at crash.c:28
d01 (x=1) at crash.c:29
raise () from /lib/libpthread.so.0
<signal handler called>
__frob (x=1) at crash.c:30�
StacktraceTopz
libfoo1 1.2-4z
Testux 1.0z�foo_bar (x=2) at crash.c:28
d01 (x=3) at crash.c:29
raise () from /lib/libpthread.so.0
<signal handler called>
__frob (x=4) at crash.c:30zbar 42-4�barz/usr/bin/brokenzuh (p=0x0) at crash.c:25
g (x=1, y=42) at crash.c:26
f (x=1) at crash.c:27
e (x=1) at crash.c:28
d (x=1) at crash.c:29zpython-goo 3epsilon1�pygooz
Testux 2.2z/usr/bin/pygooz�Traceback (most recent call last):
  File "test.py", line 7, in <module>
    print(_f(5))
  File "test.py", line 5, in _f
    return g_foo00(x+1)
  File "test.py", line 2, in g_foo00
    return x/0
ZeroDivisionError: integer division or modulo by zeror&zpython-goo 5N)rr!�Reportr0)rrVs& rr�CrashDatabase.add_sample_data�s���
�M�M� � �"��&��)��"��/��,��/����(��*��
����/��
	
���A��
�M�M� � �"��&��)��"��/��)��/����(��*��
����/��
	
���A��
�M�M� � �"��!��)��"��/��)��/����(��/��
����/��
	
���A��
�M�M� � �"��-��)��$��/��)��/��.��
��9��+��	
���A��
�M�M� � �"��%��)��$��/��)��/��.��
��9��+��	
���A�r)rrrrr)NN)FNN)N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rr0r6r9r>rErKrOrRr]rfrmrrrvr{r�r�r�r�r�r�r�__static_attributes__�__classdictcell__)r
s@rrrs������#�#�&�:3�6�0�C�C���*�*� '�DA�A�
�� ��&0�0�5�V�V��)�)�����
"�"�%�%�R�Rrr)	r�r+�typingr�apport.crashdbr�
apport.reportrrr4rr�<module>r�s.��O�����x�F�N�N�0�0�xr

Youez - 2016 - github.com/yon3zu
LinuXploit