]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python/remove_dc: fix Exception construction
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 26 Oct 2018 08:03:21 +0000 (21:03 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 1 Nov 2018 04:08:13 +0000 (05:08 +0100)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
python/samba/remove_dc.py

index 4c63710881eb8f64f6f154b1606c8ba3eea7119e..30abb385491960c61fc7b29eef5263ddb549bb7a 100644 (file)
@@ -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