Package entropy :: Module qa :: Class ErrorReport

Class ErrorReport

source code


Interface used by Entropy Client to remotely send errors via HTTP POST. Some anonymous info about the running system are collected and sent over, once the user gives the acknowledgement for this operation. User should be asked for valid credentials, such as name, surname and email. This has two advantages: block stupid and lazy people and make possible for Entropy developers to contact him/her back. Moreover, the same applies for a simple description. To improve the ability to debug an issue, it is also asked the user to describe his/her action prior to the error.

Sample code:

>>> from entropy.qa import ErrorReport
>>> error = ErrorReport('http://url_for_http_post')
>>> error.prepare('traceback_text', 'John Foo', '[email protected]',
        report_data = 'extra traceback info',
        description = 'I was installing foo!')
>>> error.submit()
Instance Methods
 
__init__(self, post_url)
ErrorReport constructor.
source code
None
prepare(self, tb_text, name, email, report_data='', description='')
This method must be called prior to submit().
source code
None
submit(self)
Submit collected data remotely via HTTP POST.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, post_url)
(Constructor)

source code 

ErrorReport constructor.

Parameters:
  • post_url (string) - HTTP post url where to submit data
Overrides: object.__init__

prepare(self, tb_text, name, email, report_data='', description='')

source code 

This method must be called prior to submit(). It is used to prepare and collect system information before the submission. It is intentionally split from submit() to allow easy reimplementation.

Parameters:
  • tb_text (string) - Python traceback text to send
  • name (string) - submitter name
  • email (string) - submitter email address
  • report_data (string) - extra information
  • description (string) - submitter action description
Returns: None
None

submit(self)

source code 

Submit collected data remotely via HTTP POST.

Returns: None
None
Raises: