~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Vincent Ladeuil
  • Date: 2011-10-27 15:38:14 UTC
  • mfrom: (6015.44.4 2.4)
  • mto: This revision was merged to the branch mainline in revision 6236.
  • Revision ID: v.ladeuil+lp@free.fr-20111027153814-0r4nd2io1jv6t47f
Merge 2.4 into trunk including fix for bug #880701

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
import bzrlib
73
73
 
74
 
from bzrlib.symbol_versioning import (
75
 
    deprecated_function,
76
 
    deprecated_in,
77
 
    )
78
 
 
79
74
lazy_import(globals(), """
80
75
from bzrlib import (
81
76
    debug,
130
125
    _bzr_logger.warning(*args, **kwargs)
131
126
 
132
127
 
133
 
@deprecated_function(deprecated_in((2, 1, 0)))
134
 
def info(*args, **kwargs):
135
 
    """Deprecated: use trace.note instead."""
136
 
    note(*args, **kwargs)
137
 
 
138
 
 
139
 
@deprecated_function(deprecated_in((2, 1, 0)))
140
 
def log_error(*args, **kwargs):
141
 
    """Deprecated: use bzrlib.trace.show_error instead"""
142
 
    _bzr_logger.error(*args, **kwargs)
143
 
 
144
 
 
145
 
@deprecated_function(deprecated_in((2, 1, 0)))
146
 
def error(*args, **kwargs):
147
 
    """Deprecated: use bzrlib.trace.show_error instead"""
148
 
    _bzr_logger.error(*args, **kwargs)
149
 
 
150
 
 
151
128
def show_error(*args, **kwargs):
152
129
    """Show an error message to the user.
153
130
 
582
559
    try:
583
560
        sys.stdout.flush()
584
561
        sys.stderr.flush()
 
562
    except ValueError, e:
 
563
        # On Windows, I get ValueError calling stdout.flush() on a closed
 
564
        # handle
 
565
        pass
585
566
    except IOError, e:
586
567
        import errno
587
568
        if e.errno in [errno.EINVAL, errno.EPIPE]: