From 7b1d878f4c11c412af15e53ee41e8a4b2f7f0b02 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 26 Oct 2018 21:03:21 +1300 Subject: [PATCH] python/remove_dc: fix Exception construction Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- python/samba/remove_dc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.47.2