s4-fsmo: say which role is being transferred
authorAndrew Tridgell <tridge@samba.org>
Mon, 28 Mar 2011 05:48:46 +0000 (16:48 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 28 Mar 2011 22:00:23 +0000 (00:00 +0200)
this is particularly useful for "samba-tool fsmo transfer --role=all"

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,