~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: John Arbash Meinel
  • Date: 2011-09-23 20:24:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6170.
  • Revision ID: john@arbash-meinel.com-20110923202451-5hrc3s8zmmh9tnoi
Add a nicer repr for shutting down.

Also, if we disconnect the stdin/stdout handles, it looks like we get ValueError
trying to flush them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
    try:
560
560
        sys.stdout.flush()
561
561
        sys.stderr.flush()
 
562
    except ValueError, e:
 
563
        # On Windows, I get ValueError calling stdout.flush() on a closed
 
564
        # handle
 
565
        pass
562
566
    except IOError, e:
563
567
        import errno
564
568
        if e.errno in [errno.EINVAL, errno.EPIPE]: