join: Remove unnecessary clone_only flag
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 28 Jun 2018 22:40:58 +0000 (10:40 +1200)
committerGary Lockyer <gary@samba.org>
Tue, 3 Jul 2018 06:12:10 +0000 (08:12 +0200)
commitc2422593f46a7f4c1bd7421919f48b1fe7550e59
treed7807df6cd677232bad34655c7b90e1aeccd7541
parent3230c345da33a6ebd444791d04df5e0e408102dd
join: Remove unnecessary clone_only flag

For the clone-only case, we have been avoiding a block of code in the
DCJoinContext's __init__(). The main reason we do this is because the
netbios_name is None for clones, and this block of code tries to derive
a bunch of values based on the netbios_name (otherwise, a few lines into
this block, it tries to do NoneType.lower(), which Python doesn't like
very much).

This code is not particularly clone-specific - it is just never going to
work if the netbios_name is None. So we can change the conditional
check, which allows us to get rid of the clone_only flag.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Tue Jul  3 08:12:10 CEST 2018 on sn-devel-144
python/samba/join.py