python: Do not mix bytes and unicode strings
authorMathieu Bridon <bochecha@daitauha.fr>
Thu, 9 Aug 2018 08:27:21 +0000 (10:27 +0200)
committerDylan Baker <dylan@pnwbakers.com>
Thu, 9 Aug 2018 23:49:19 +0000 (16:49 -0700)
commit14f1ab998fcdcd8fec43c3da8ef03af4af2d3966
treeb4352953eaabf0f58cec1a1f3b5474a1735e9211
parentc644b2d7a7602e929b92dd2c52ed2765928e02b1
python: Do not mix bytes and unicode strings

Mixing the two is a long-standing recipe for errors in Python 2, so much
so that Python 3 now completely separates them.

This commit stops treating both as if they were the same, and in the
process makes the script compatible with both Python 2 and 3.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/compiler/nir/nir_algebraic.py