/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/trace.py

  • Committer: Martin Pool
  • Date: 2009-11-26 01:42:06 UTC
  • mfrom: (4827 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4828.
  • Revision ID: mbp@sourcefrog.net-20091126014206-qvf8jfpwpro558r4
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
445
445
 
446
446
    :return: The appropriate exit code for this error.
447
447
    """
448
 
    exc_type, exc_object, exc_tb = exc_info
449
448
    # Log the full traceback to ~/.bzr.log
450
449
    log_exception_quietly()
 
450
    if 'error' in debug.debug_flags:
 
451
        print_exception(exc_info, err_file)
 
452
        return errors.EXIT_ERROR
 
453
    exc_type, exc_object, exc_tb = exc_info
451
454
    if (isinstance(exc_object, IOError)
452
455
        and getattr(exc_object, 'errno', None) == errno.EPIPE):
453
456
        err_file.write("bzr: broken pipe\n")
494
497
    :param advice: Extra advice to the user to be printed following the
495
498
        exception.
496
499
    """
497
 
    if 'error' in debug.debug_flags:
498
 
        print_exception(exc_info, err_file)
499
 
        return
500
500
    err_file.write("bzr: ERROR: %s\n" % (exc_info[1],))
501
501
    if advice:
502
502
        err_file.write("%s\n" % (advice,))