/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 bzrlib/tests/ui_testing.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
    encoding = "ascii"
32
32
 
 
33
    def write(self, string):
 
34
        if isinstance(string, bytes):
 
35
            string = string.decode(self.encoding)
 
36
        io.StringIO.write(self, string)
 
37
 
33
38
 
34
39
class BytesIOWithEncoding(io.BytesIO):
35
40