Show More
@@ -432,6 +432,9 class PlainTextFormatter(BaseFormatter): | |||||
432 | else: |
|
432 | else: | |
433 | # This uses use StringIO, as cStringIO doesn't handle unicode. |
|
433 | # This uses use StringIO, as cStringIO doesn't handle unicode. | |
434 | stream = StringIO() |
|
434 | stream = StringIO() | |
|
435 | # self.newline.encode() is a quick fix for issue gh-597. We need to | |||
|
436 | # ensure that stream does not get a mix of unicode and bytestrings, | |||
|
437 | # or it will cause trouble. | |||
435 | printer = pretty.RepresentationPrinter(stream, self.verbose, |
|
438 | printer = pretty.RepresentationPrinter(stream, self.verbose, | |
436 | self.max_width, self.newline.encode(), |
|
439 | self.max_width, self.newline.encode(), | |
437 | singleton_pprinters=self.singleton_printers, |
|
440 | singleton_pprinters=self.singleton_printers, |
General Comments 0
You need to be logged in to leave comments.
Login now