/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Ian Clatworthy
  • Date: 2009-03-04 05:07:37 UTC
  • mto: (0.64.138 trunk)
  • mto: This revision was merged to the branch mainline in revision 6631.
  • Revision ID: ian.clatworthy@internode.on.net-20090304050737-zd7fnlgf18fsdvmc
make sure fast-export uses a binary stream on Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    import parser
68
68
    if source == '-':
69
69
        import sys
70
 
        stream = sys.stdin
71
 
        try:
72
 
            import os
73
 
            if os.name == 'nt':
74
 
                fileno = getattr(sys.stdin, 'fileno', None)
75
 
                if fileno:
76
 
                    no = fileno()
77
 
                    if no >= 0:     # -1 means we're working as subprocess
78
 
                        import msvcrt
79
 
                        msvcrt.setmode(no, os.O_BINARY)
80
 
        except ImportError:
81
 
            pass
 
70
        stream = helpers.binary_stream(sys.stdin)
82
71
    else:
83
72
        stream = open(source, "rb")
84
73
    proc = processor_factory(control, params=params, verbose=verbose)