diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-04-09 02:37:20 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-04-09 11:53:00 +0200 |
commit | 0d92dd1074971a3c1e3116de5188a475298587a2 (patch) | |
tree | b281586bb4ec84520b6a8037b5f2a495d694b231 /source4/scripting | |
parent | 410527f9369c44a25a5689b4665f3485c16d625a (diff) | |
download | samba-0d92dd1074971a3c1e3116de5188a475298587a2.tar.gz samba-0d92dd1074971a3c1e3116de5188a475298587a2.tar.bz2 samba-0d92dd1074971a3c1e3116de5188a475298587a2.zip |
s4-net: Cope with options without arguments.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/netcmd/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index 528262ec9e..3dcf019a5f 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -79,7 +79,8 @@ class Command(object): kwargs = dict(opts.__dict__) for option_group in parser.option_groups: for option in option_group.option_list: - del kwargs[option.dest] + if option.dest is not None: + del kwargs[option.dest] kwargs.update(optiongroups) min_args = 0 max_args = 0 |