~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Jelmer Vernooij
  • Date: 2011-02-19 15:23:08 UTC
  • mto: (5582.12.2 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5718.
  • Revision ID: jelmer@samba.org-20110219152308-5shhc4rj0ez4oa12
move xml4 to weave plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
488
488
        elif fd is not None:
489
489
            os.close(fd)
490
490
 
491
 
 
492
 
def _qualified_exception_name(eclass, unqualified_bzrlib_errors=False):
493
 
    """Give name of error class including module for non-builtin exceptions
494
 
 
495
 
    If `unqualified_bzrlib_errors` is True, errors specific to bzrlib will
496
 
    also omit the module prefix.
497
 
    """
498
 
    class_name = eclass.__name__
499
 
    module_name = eclass.__module__
500
 
    if module_name in ("exceptions", "__main__") or (
501
 
            unqualified_bzrlib_errors and module_name == "bzrlib.errors"):
502
 
        return class_name
503
 
    return "%s.%s" % (module_name, class_name)
504
 
 
505
 
 
506
491
def report_exception(exc_info, err_file):
507
492
    """Report an exception to err_file (typically stderr) and to .bzr.log.
508
493