fix python 3 compatibility

Signed-off-by: Michael Walle <michael.walle@kontron.com>