From: Andrew Bartlett Date: Wed, 20 Apr 2016 20:16:19 +0000 (+1200) Subject: samba-tool domain demote: Fix error handling and error messages X-Git-Tag: tdb-1.3.10~1005 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ea840010ee037da0eab40b0a1c021659fdb95411;p=thirdparty%2Fsamba.git samba-tool domain demote: Fix error handling and error messages Due to an error in a previous patch, e was undefined Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 68775ec4f11..8437455c6f8 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -789,12 +789,12 @@ class cmd_domain_demote(Command): pass else: self.errf.write( - "Error while demoting, " - "re-enabling inbound replication\n") + "Error while replicating out last local changes from '%s' for demotion, " + "re-enabling inbound replication\n" % part) dsa_options ^= DS_NTDSDSA_OPT_DISABLE_INBOUND_REPL nmsg["options"] = ldb.MessageElement(str(dsa_options), ldb.FLAG_MOD_REPLACE, "options") samdb.modify(nmsg) - raise CommandError("Error while sending a DsReplicaSync for partion %s" % str(part), e) + raise CommandError("Error while sending a DsReplicaSync for partition '%s'" % str(part), string) try: remote_samdb = SamDB(url="ldap://%s" % server, session_info=system_session(),