summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-09 02:37:20 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-09 11:53:00 +0200
commit0d92dd1074971a3c1e3116de5188a475298587a2 (patch)
treeb281586bb4ec84520b6a8037b5f2a495d694b231 /source4
parent410527f9369c44a25a5689b4665f3485c16d625a (diff)
downloadsamba-0d92dd1074971a3c1e3116de5188a475298587a2.tar.gz
samba-0d92dd1074971a3c1e3116de5188a475298587a2.tar.bz2
samba-0d92dd1074971a3c1e3116de5188a475298587a2.zip
s4-net: Cope with options without arguments.
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py3
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