samba-tool domain demote: Use dn.add_base/dn.add_child
authorAndrew Bartlett <abartlet@samba.org>
Fri, 23 Oct 2015 00:12:03 +0000 (13:12 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 26 Oct 2015 04:11:22 +0000 (05:11 +0100)
commita3b92a50d13a0a0d444b156c6dcffa0eebb9c03b
tree7673c96e2f4381d9c9fef83da29c7d5881c985b4
parent00ffb67be2c73582502ef1d2931853ec9899a9ef
samba-tool domain demote: Use dn.add_base/dn.add_child

This is done primarilly to set the pattern that we should manipulate ldb.Dn values
with the helper routines, not just by concatonation via format strings.

We also restrict our exception hadling to only the expected errors, not
all errors.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
python/samba/netcmd/domain.py
python/samba/remove_dc.py