Commit 7102732b authored by Noel Power's avatar Noel Power Committed by Noel Power
Browse files

python/samba: Fix incorrect encode of password

In python2 you can encode a 'str' type which doesn't really make sense
since it is already bytes (as such). In python3 this isn't possible you
can't encode bytes or decode strings. Also because you can call encode
on 'str' in python2 it tries to to what you wanted and it implicity
calls decode('ascii') before performing the encode. This is why we get
mention of ascii codec in the error. This patch should future proof for
python3 also.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13435


Signed-off-by: default avatarNoel Power <noel.power@suse.com>
Reviewed-by: default avatarAndrew Bartlett <abartlet@samba.org>
parent b28b6a45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment