--- python/samba/netcmd/domain.py 2016-02-09 10:40:29.000000000 +0100 +++ python/samba/netcmd/domain.py 2016-07-08 14:56:40.477396407 +0200 @@ -789,12 +789,12 @@ 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(), @@ -936,11 +936,11 @@ remote_samdb.modify(msg) remote_samdb.rename(newdn, dc_dn) if werr == 8452: #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: " % server_dsa_dn, string) else: - raise CommandError("Error while sending a removeDsServer of %s: " % server_dsa_dn, e) + raise CommandError("Error while sending a removeDsServer of %s: " % server_dsa_dn, string) - remove_dc.remove_sysvol_references(remote_samdb, dc_name) + remove_dc.remove_sysvol_references(remote_samdb, logger, dc_name) # These are objects under the computer account that should be deleted for s in ("CN=Enterprise,CN=NTFRS Subscriptions",