~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-12 08:03:28 UTC
  • mfrom: (4949.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100112080328-cb0tvu90uglxlrw0
(mbp) merge 2.0 back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
            bzr_log_file.write("bug reports to https://bugs.launchpad.net/bzr/+filebug\n\n")
251
251
        return bzr_log_file
252
252
    except IOError, e:
253
 
        warning("failed to open trace file: %s" % (e))
 
253
        # If we are failing to open the log, then most likely logging has not
 
254
        # been set up yet. So we just write to stderr rather than using
 
255
        # 'warning()'. If we using warning(), users get the unhelpful 'no
 
256
        # handlers registered for "bzr"' when something goes wrong on the
 
257
        # server. (bug #503886)
 
258
        sys.stderr.write("failed to open trace file: %s\n" % (e,))
254
259
    # TODO: What should happen if we fail to open the trace file?  Maybe the
255
260
    # objects should be pointed at /dev/null or the equivalent?  Currently
256
261
    # returns None which will cause failures later.