/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 breezy/tests/script.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-17 09:43:24 UTC
  • mfrom: (7045.1.9 python3-o)
  • Revision ID: breezy.the.bot@gmail.com-20180717094324-sejdvmx3kha2zeq8
Fix another ~500 tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-o/+merge/349632

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
            in_name = redirected_file_name('<', arg[1:], args)
164
164
        elif arg.startswith('>>'):
165
165
            out_name = redirected_file_name('>>', arg[2:], args)
166
 
            out_mode = 'ab+'
 
166
            out_mode = 'a+'
167
167
        elif arg.startswith('>',):
168
168
            out_name = redirected_file_name('>', arg[1:], args)
169
 
            out_mode = 'wb+'
 
169
            out_mode = 'w+'
170
170
        else:
171
171
            remaining.append(arg)
172
172
    return in_name, out_name, out_mode, remaining
296
296
 
297
297
    def _read_input(self, input, in_name):
298
298
        if in_name is not None:
299
 
            infile = open(in_name, 'rb')
 
299
            infile = open(in_name, 'r')
300
300
            try:
301
301
                # Command redirection takes precedence over provided input
302
302
                input = infile.read()