From ca3f2853901c9ae37da561434fe6c50cf23f012c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 10 Sep 2012 14:02:19 +0200 Subject: s4:python/netcmd: give the Commad implementations access to the raw arguments metze --- source4/scripting/python/samba/netcmd/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- cgit