Python3: Fix traceback while running unit tests

While running the unit tests with python3 the following
traceback appears:

TypeError: can't use a string pattern on a bytes-like object

This is due to the way that python2 and python3 handles unicodes.

Change-Id: I401f1cefed69780073222cae98d8da4c3d8031a8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "Python3: Fix traceback while running unit tests"