s4:samba-tool: allow 'samba-tool --version'
authorStefan Metzmacher <metze@samba.org>
Mon, 8 Oct 2012 10:50:33 +0000 (12:50 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 8 Oct 2012 14:13:06 +0000 (16:13 +0200)
metze

source4/scripting/python/samba/netcmd/main.py

index 5ffeef0ec26ec0b6fa0565a4bfd7ad4ffdb26fa7..af3abfd0d390906a8a86d8df6176fa79282c623e 100644 (file)
@@ -17,6 +17,8 @@
 
 """The main samba-tool command implementation."""
 
+from samba import getopt as options
+
 from samba.netcmd import SuperCommand
 from samba.netcmd.dbcheck import cmd_dbcheck
 from samba.netcmd.delegation import cmd_delegation
@@ -41,6 +43,10 @@ from samba.netcmd.vampire import cmd_vampire
 class cmd_sambatool(SuperCommand):
     """Main samba administration tool."""
 
+    takes_optiongroups = {
+        "versionopts": options.VersionOptions,
+        }
+
     subcommands = {}
     subcommands["dbcheck"] =  cmd_dbcheck()
     subcommands["delegation"] = cmd_delegation()