mirror of
https://github.com/samba-team/samba.git
synced 2025-07-29 15:42:04 +03:00
samba-tool: Improve getopt.py error handling
Raise exception when -d or --debuglevel value is <0
This commit is contained in:
committed by
Jelmer Vernooij
parent
e1d2b47693
commit
0c342f8986
@ -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):
|
||||
|
Reference in New Issue
Block a user