Fix a few Python 3.x issues

Automatic casting does not happen anymore in 3.x, which causes an
issues when comparing strings with ints.
Bytes are actually strings in py2.7, but it's not possible to
concatenate bytes and strings in py3.x or to search for a string
in an array of bytes.

Change-Id: I787f8f0e371beb314a39cf036c56e21ed0fba6e6
3 files changed