4
LpBugReporter is a Python module that help your users to report bugs.
5
It will display the uncatched exception to the user and suggest him to check if
6
this bug is already reported.
8
In the case that the bug is unknow from your project's Launchpad bugs page,
9
your users will be invited to report that bug directly in the new Bug page of
16
To install LpBugReporter, you just need to add my PPA to your sources, and
17
install it as following:
19
sudo add-apt-repository ppa:zedtux/lpbugreporter
21
sudo apt-get install lpbugreporter
27
LpBugReporter should be implemented on top of your code to be able to catch any
28
not managed exception.
30
In order to show you how to implement it into your project, I'm going to show
32
Given the following files/folders tree:
36
`--my_app.py # Main file
44
Everything should be done in the file 'my_app.py'.
45
The first step is to *try* to import lpbugreporter.
46
Second step is to embed all your code into a try: except:
47
Finally, in case of uncatched exception, call lpbugreporter for your project:
49
---[ On top of my_app.py ]------------------------------------------------------
54
print "Warning: The Launchpad Bug Reporter module is not importable !"
59
# All you import and code here
62
except not SystemExit:
65
stringio = cStringIO.StringIO()
66
traceback.print_exc(file=stringio)
68
lpbugreporter.LpBugReporter("YouApplicationName")
70
print "An exception occured, but the Launchpad Bug Reporter module is missing or not importable."
72
print "Python traceback content was:"
73
print stringio.getvalue()
75
---[ End Of File ]--------------------------------------------------------------