~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Martin Pool
  • Date: 2009-08-20 03:17:44 UTC
  • mto: This revision was merged to the branch mainline in revision 4632.
  • Revision ID: mbp@sourcefrog.net-20090820031744-kojysgsufw05anes
Add -Dno_apport and fallback if apport fails

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import bzrlib
30
30
from bzrlib import (
31
31
    config,
 
32
    debug,
32
33
    osutils,
33
34
    plugin,
34
35
    trace,
36
37
 
37
38
 
38
39
def report_bug(exc_info, stderr):
39
 
    report_bug_to_apport(exc_info, stderr) or \
40
 
        report_bug_legacy(exc_info, stderr)
 
40
    if 'no_apport' not in debug.debug_flags:
 
41
        try:
 
42
            report_bug_to_apport(exc_info, stderr)
 
43
            return
 
44
        except Exception, e:
 
45
            sys.stderr.write("failed to report crash using apport: %r"  % e)
 
46
            pass
 
47
    report_bug_legacy(exc_info, stderr)
41
48
 
42
49
 
43
50
def report_bug_legacy(exc_info, err_file):