Fix Python2/3 compatiibility

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>