1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-21 20:23:50 +03:00

python/samba/netcmd: Fix wrong exception referenced in code

post commit: 52729d3549 wrong
exception name was referenced.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 13 04:01:59 CEST 2018 on sn-devel-144
This commit is contained in:
Noel Power
2018-06-27 12:01:18 +01:00
committed by Andrew Bartlett
parent d96d85a22b
commit f8d9751344

View File

@@ -821,7 +821,10 @@ class cmd_domain_demote(Command):
controls=["search_options:1:2"])
if len(res) != 0:
raise CommandError("Current DC is still the owner of %d role(s), use the role command to transfer roles to another DC" % len(res))
raise CommandError("Current DC is still the owner of %d role(s), "
"use the role command to transfer roles to "
"another DC" %
len(res))
self.errf.write("Using %s as partner server for the demotion\n" %
server)
@@ -1012,9 +1015,13 @@ class cmd_domain_demote(Command):
remote_samdb.modify(msg)
remote_samdb.rename(newdn, dc_dn)
if werr == werror.WERR_DS_DRA_NO_REPLICA:
raise CommandError("The DC %s is not present on (already removed from) the remote server: " % server_dsa_dn, e)
raise CommandError("The DC %s is not present on (already "
"removed from) the remote server: %s" %
(server_dsa_dn, e3))
else:
raise CommandError("Error while sending a removeDsServer of %s: " % server_dsa_dn, e)
raise CommandError("Error while sending a removeDsServer "
"of %s: %s" %
(server_dsa_dn, e3))
remove_dc.remove_sysvol_references(remote_samdb, logger, dc_name)