From: Stefan Metzmacher Date: Mon, 10 Sep 2012 12:02:19 +0000 (+0200) Subject: s4:python/netcmd: give the Commad implementations access to the raw arguments X-Git-Tag: samba-4.0.0rc1~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca3f2853901c9ae37da561434fe6c50cf23f012c;p=thirdparty%2Fsamba.git s4:python/netcmd: give the Commad implementations access to the raw arguments metze --- diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index b3a40837f22..f8ce5abe18f 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: