~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-23 08:19:28 UTC
  • mfrom: (5317 +trunk)
  • mto: (5247.1.11 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100623081928-z9q18q30oo5as831
Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
    _trace_file = old_trace_file
375
375
    bzr_logger = logging.getLogger('bzr')
376
376
    bzr_logger.removeHandler(new_handler)
377
 
    # must be closed, otherwise logging will try to close it atexit, and the
 
377
    # must be closed, otherwise logging will try to close it at exit, and the
378
378
    # file will likely already be closed underneath.
379
379
    new_handler.close()
380
380
    bzr_logger.handlers = old_handlers
540
540
 
541
541
 
542
542
def _flush_stdout_stderr():
543
 
    # installed into an atexit hook by bzrlib.initialize()
 
543
    # called from the bzrlib library finalizer returned by bzrlib.initialize()
544
544
    try:
545
545
        sys.stdout.flush()
546
546
        sys.stderr.flush()
553
553
 
554
554
 
555
555
def _flush_trace():
556
 
    # run from atexit hook
 
556
    # called from the bzrlib library finalizer returned by bzrlib.initialize()
557
557
    global _trace_file
558
558
    if _trace_file:
559
559
        _trace_file.flush()