/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: Alexander Belchenko
  • Date: 2011-03-28 08:27:18 UTC
  • mfrom: (5742 +trunk)
  • mto: (5759.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5760.
  • Revision ID: bialix@ukr.net-20110328082718-wb3emf38d4iffmcp
merge trunk

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
 
491
506
def report_exception(exc_info, err_file):
492
507
    """Report an exception to err_file (typically stderr) and to .bzr.log.
493
508