mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4:python/netcmd: give the Commad implementations access to the raw arguments
metze
This commit is contained in:
parent
7f98cf1698
commit
ca3f285390
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user