summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-10 14:02:19 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-11 08:23:56 +0200
commitca3f2853901c9ae37da561434fe6c50cf23f012c (patch)
tree120861f0c280a8ac37ae360f5c0b91b8afb38046
parent7f98cf169843d91571baaa5d8f29d6528c0fa359 (diff)
downloadsamba-ca3f2853901c9ae37da561434fe6c50cf23f012c.tar.gz
samba-ca3f2853901c9ae37da561434fe6c50cf23f012c.tar.bz2
samba-ca3f2853901c9ae37da561434fe6c50cf23f012c.zip
s4:python/netcmd: give the Commad implementations access to the raw arguments
metze
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index b3a40837f2..f8ce5abe18 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -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: