diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-19 11:39:52 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-21 11:44:32 +1000 |
commit | a8cba72119987803a806c3e05f3b5ac3c1be755d (patch) | |
tree | 9285d728f528d3d363720681eef55bfbd4d14261 /source4/scripting | |
parent | bfd94a1515ccb93d1e11b370ada5afc095982307 (diff) | |
download | samba-a8cba72119987803a806c3e05f3b5ac3c1be755d.tar.gz samba-a8cba72119987803a806c3e05f3b5ac3c1be755d.tar.bz2 samba-a8cba72119987803a806c3e05f3b5ac3c1be755d.zip |
samba-tool: nicer error in passwordsettings with no settings
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 9085d8b56e..680cfe9d10 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -479,6 +479,8 @@ class cmd_domain_passwordsettings(Command): if max_pwd_age > 0 and min_pwd_age >= max_pwd_age: raise CommandError("Maximum password age (%d) must be greater than minimum password age (%d)!" % (max_pwd_age, min_pwd_age)) + if len(m) == 0: + raise CommandError("You must specify at least one option to set. Try --help") samdb.modify(m) msgs.append("All changes applied successfully!") self.message("\n".join(msgs)) |