Message232591
Thanks for the patch Aaron. Unfortunately this doesn't quite fix the issue. There are two problems with the patch:
If a bytes object is passed into mock_open, I'd expect a bytes object in the output. In your patch, not only is this not the case (the output is a string object), but the bytes object is being coerced into its string representation in the resulting list. For example (simplified from your patch):
>>> data = b'foo\nbar'
>>> newline = b'\n'
>>>
>>> ['{}\n'.format(l) for l in data.split(newline)]
["b'foo'\n", "b'bar'\n"]
What I would expect to see in this case is:
[b'foo\n', b'bar\n'] |
|
Date |
User |
Action |
Args |
2014-12-13 03:41:18 | demian.brecht | set | recipients:
+ demian.brecht, jcea, a.badger, michael.foord, berker.peksag, Aaron1011 |
2014-12-13 03:41:18 | demian.brecht | set | messageid: <1418442078.72.0.491346043221.issue23004@psf.upfronthosting.co.za> |
2014-12-13 03:41:18 | demian.brecht | link | issue23004 messages |
2014-12-13 03:41:18 | demian.brecht | create | |
|