diff options
-rw-r--r-- | source4/scripting/python/samba/getopt.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/getopt.py b/source4/scripting/python/samba/getopt.py index f939180066..c7035c1936 100644 --- a/source4/scripting/python/samba/getopt.py +++ b/source4/scripting/python/samba/getopt.py @@ -64,6 +64,9 @@ class SambaOptions(optparse.OptionGroup): self._configfile = arg def _set_debuglevel(self, option, opt_str, arg, parser): + if arg < 0: + raise optparse.OptionValueError("invalid %s option value: %s" % + (opt_str, arg)) self._lp.set('debug level', str(arg)) def _set_realm(self, option, opt_str, arg, parser): |