From: Douglas Bagnall Date: Fri, 26 Oct 2018 08:03:21 +0000 (+1300) Subject: python/remove_dc: fix Exception construction X-Git-Tag: tdb-1.3.17~1018 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1d878f4c11c412af15e53ee41e8a4b2f7f0b02;p=thirdparty%2Fsamba.git python/remove_dc: fix Exception construction Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py index 4c63710881e..30abb385491 100644 --- a/python/samba/remove_dc.py +++ b/python/samba/remove_dc.py @@ -394,8 +394,8 @@ def remove_dc(samdb, logger, dc_name): except LdbError as e3: (enum, estr) = e3.args raise DemoteException("Failure checking if %s is an server " - "object in %s: " - % (dc_name, samdb.domain_dns_name()), estr) + "object in %s: %s" + % (dc_name, samdb.domain_dns_name(), estr)) if (len(server_msgs) == 0): samdb.transaction_cancel() @@ -418,8 +418,9 @@ def remove_dc(samdb, logger, dc_name): pass else: samdb.transaction_cancel() - raise DemoteException("Failure checking if %s is an NTDS DSA in %s: " - % (ntds_dn, samdb.domain_dns_name()), estr) + raise DemoteException( + "Failure checking if %s is an NTDS DSA in %s: %s" % + (ntds_dn, samdb.domain_dns_name(), estr)) # If the NTDS Settings child DN wasn't found or wasnt an ntdsDSA # object, just remove the server object located above