~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-14 12:23:29 UTC
  • mfrom: (5229.2.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100514122329-vhb5ozlixpg7bxsu
(vila, Martin [gz]) More robust stream checking for subunit on windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
3594
3594
            self.additional_selftest_args['runner_class'] = SubUnitBzrRunner
3595
3595
            # On Windows, disable automatic conversion of '\n' to '\r\n' in
3596
3596
            # stdout, which would corrupt the subunit stream. 
3597
 
            if sys.platform == "win32" and sys.stdout.fileno() >= 0:
 
3597
            # FIXME: This has been fixed in subunit trunk (>0.0.5) so the
 
3598
            # following code can be deleted when it's sufficiently deployed
 
3599
            # -- vila/mgz 20100514
 
3600
            if (sys.platform == "win32"
 
3601
                and getattr(sys.stdout, 'fileno', None) is not None):
3598
3602
                import msvcrt
3599
3603
                msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
3600
3604
        if parallel: