/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
In principle apport can run on any platform though as of Feb 2010 there seem
34
34
to be some portability bugs.
35
35
 
36
 
To force this off in bzr turn set APPORT_DISBLE in the environment or 
 
36
To force this off in bzr turn set APPORT_DISABLE in the environment or 
37
37
-Dno_apport.
38
38
"""
39
39
 
143
143
    exc_type, exc_object, exc_tb = exc_info
144
144
 
145
145
    pr = Report()
146
 
    # add_proc_info gets the executable and interpreter path, which is needed,
147
 
    # plus some less useful stuff like the memory map
 
146
    # add_proc_info gives you the memory map of the process, which is not so
 
147
    # useful for Bazaar but does tell you what binary libraries are loaded.
 
148
    # More importantly it sets the ExecutablePath, InterpreterPath, etc.
148
149
    pr.add_proc_info()
149
150
    pr.add_user_info()
150
151
 
165
166
    pr['PythonLoadedModules'] = _format_module_list()
166
167
    pr['BzrDebugFlags'] = pprint.pformat(debug.debug_flags)
167
168
 
 
169
    # actually we'd rather file directly against the upstream product, but
 
170
    # apport does seem to count on there being one in there; we might need to
 
171
    # redirect it elsewhere anyhow
 
172
    pr['SourcePackage'] = 'bzr'
 
173
    pr['Package'] = 'bzr'
 
174
 
 
175
    # tell apport to file directly against the bzr package using 
 
176
    # <https://bugs.edge.launchpad.net/bzr/+bug/391015>
 
177
    #
 
178
    # XXX: unfortunately apport may crash later if the crashdb definition
 
179
    # file isn't present
 
180
    pr['CrashDb'] = 'bzr'
 
181
 
168
182
    tb_file = StringIO()
169
183
    traceback.print_exception(exc_type, exc_object, exc_tb, file=tb_file)
170
184
    pr['Traceback'] = tb_file.getvalue()