s4-fsmo: say which role is being transferred
[ira/wip.git] / source4 / scripting / python / samba / netcmd / fsmo.py
index 2aa1739b56693cfb9568cb1de3015c47aa9bb127..2b2faa7fdf71ab9da5585ce2fbe4cc3d739f93d7 100644 (file)
@@ -91,8 +91,8 @@ all=all of the above"""),
         try:
             samdb.modify(m)
         except LdbError, (num, msg):
-            raise CommandError("Failed to initiate transfer: %s" % msg)
-        print("FSMO transfer successful")
+            raise CommandError("Failed to initiate transfer of '%s' role: %s" % (role, msg))
+        print("FSMO transfer of '%s' role successful" % role)
 
 
     def seize_role(self, role, samdb, force):
@@ -133,8 +133,8 @@ all=all of the above"""),
         try:
             samdb.modify(m)
         except LdbError, (num, msg):
-            raise CommandError("Failed to initiate role seize: %s" % msg)
-        print("FSMO transfer successful")
+            raise CommandError("Failed to initiate role seize of '%s' role: %s" % (role, msg))
+        print("FSMO transfer of '%s' role successful" % role)
 
 
     def run(self, subcommand, force=None, url=None, role=None,