s4:python/netcmd: give the Commad implementations access to the raw arguments
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Sep 2012 12:02:19 +0000 (14:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 11 Sep 2012 06:23:56 +0000 (08:23 +0200)
metze

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

index b3a40837f2219e8fe082b48a94ce40bf33cfbb2f..f8ce5abe18f7ec14cef3ad04e3c17780df350393 100644 (file)
@@ -70,6 +70,10 @@ class Command(object):
     takes_options = []
     takes_optiongroups = {}
 
+    raw_argv = None
+    raw_args = None
+    raw_kwargs = None
+
     def __init__(self, outf=sys.stdout, errf=sys.stderr):
         self.outf = outf
         self.errf = errf
@@ -156,6 +160,10 @@ class Command(object):
             parser.print_usage()
             return -1
 
+        self.raw_argv = list(argv)
+        self.raw_args = args
+        self.raw_kwargs = kwargs
+
         try:
             return self.run(*args, **kwargs)
         except Exception, e: