samba-tool: really deprecate 'samba-tool user add'
authorStefan Metzmacher <metze@samba.org>
Thu, 2 Jun 2016 13:15:52 +0000 (15:15 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Jun 2016 03:00:15 +0000 (05:00 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/user.py

index cf640b0da877f07e68e2c683a512a2ad2c9787f9..7391af582fc6e4aa2d4fa5fb4741918f4643400f 100644 (file)
@@ -208,10 +208,10 @@ class cmd_user_add(cmd_user_create):
     # migrate to create
 
     def run(self, *args, **kwargs):
-        self.err.write(
+        self.outf.write(
             "Note: samba-tool user add is deprecated.  "
             "Please use samba-tool user create for the same function.\n")
-        return super(self, cmd_user_add).run(*args, **kwargs)
+        return super(cmd_user_add, self).run(*args, **kwargs)
 
 
 class cmd_user_delete(Command):
@@ -615,7 +615,7 @@ class cmd_user(SuperCommand):
     """User management."""
 
     subcommands = {}
-    subcommands["add"] = cmd_user_create()
+    subcommands["add"] = cmd_user_add()
     subcommands["create"] = cmd_user_create()
     subcommands["delete"] = cmd_user_delete()
     subcommands["disable"] = cmd_user_disable()