~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 09:22:00 UTC
  • mfrom: (6008 +trunk)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706092200-7iai2mwzc0sqdsvf
MergingĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    # this function is based on apport_package_hook.py, but omitting some of the
121
121
    # Ubuntu-specific policy about what to report and when
122
122
 
123
 
    # if the import fails, the exception will be caught at a higher level and
124
 
    # we'll report the error by other means
 
123
    # This import is apparently not used, but we're doing it so that if the
 
124
    # import fails, the exception will be caught at a higher level and we'll
 
125
    # report the error by other means.
125
126
    import apport
126
127
 
127
128
    crash_filename = _write_apport_report_to_file(exc_info)
151
152
    exc_type, exc_object, exc_tb = exc_info
152
153
 
153
154
    pr = Report()
154
 
    # add_proc_info gives you the memory map of the process, which is not so
155
 
    # useful for Bazaar but does tell you what binary libraries are loaded.
156
 
    # More importantly it sets the ExecutablePath, InterpreterPath, etc.
 
155
    # add_proc_info sets the ExecutablePath, InterpreterPath, etc.
157
156
    pr.add_proc_info()
 
157
    # It also adds ProcMaps which for us is rarely useful and mostly noise, so
 
158
    # let's remove it.
 
159
    del pr['ProcMaps']
158
160
    pr.add_user_info()
159
161
 
160
162
    # Package and SourcePackage are needed so that apport will report about even
262
264
 
263
265
 
264
266
def _format_plugin_list():
265
 
    plugin_lines = []
266
 
    for name, a_plugin in sorted(plugin.plugins().items()):
267
 
        plugin_lines.append("  %-20s %s [%s]" %
268
 
            (name, a_plugin.path(), a_plugin.__version__))
269
 
    return '\n'.join(plugin_lines)
 
267
    return ''.join(plugin.describe_plugins(show_paths=True))
270
268
 
271
269
 
272
270
def _format_module_list():