diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-09-10 14:02:19 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-11 08:23:56 +0200 |
commit | ca3f2853901c9ae37da561434fe6c50cf23f012c (patch) | |
tree | 120861f0c280a8ac37ae360f5c0b91b8afb38046 /source4/scripting/python | |
parent | 7f98cf169843d91571baaa5d8f29d6528c0fa359 (diff) | |
download | samba-ca3f2853901c9ae37da561434fe6c50cf23f012c.tar.gz samba-ca3f2853901c9ae37da561434fe6c50cf23f012c.tar.bz2 samba-ca3f2853901c9ae37da561434fe6c50cf23f012c.zip |
s4:python/netcmd: give the Commad implementations access to the raw arguments
metze
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/netcmd/__init__.py | 8 |
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: |