Re: [Mesa-dev] [PATCH 13/26] python: Explicitly use byte strings

2018-07-05 Thread Eric Engestrom
On Thursday, 2018-07-05 15:17:44 +0200, Mathieu Bridon wrote: > In both Python 2 and 3, zlib.Compress.compress() takes a byte string, > and returns a byte string as well. > > In Python 2, the script was working because: > > 1. string literalls were byte strings; > 2. opening a file in unicode

[Mesa-dev] [PATCH 13/26] python: Explicitly use byte strings

2018-07-05 Thread Mathieu Bridon
In both Python 2 and 3, zlib.Compress.compress() takes a byte string, and returns a byte string as well. In Python 2, the script was working because: 1. string literalls were byte strings; 2. opening a file in unicode mode, reading from it, then passing the unicode string to compress() would