Fix python2 build error, avoid decode when using python2
To avoid problematic type checking for 'str' types which fail when result from str.decode is used.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13777
Signed-off-by: Noel Power noel.power@suse.com