1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python/getopt: -d/--debuglevel saves value in options for scripts

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Douglas Bagnall 2017-04-12 12:34:49 +12:00 committed by Douglas Bagnall
parent 6cbd3b52cd
commit d5b123e461

View File

@ -65,6 +65,7 @@ class SambaOptions(optparse.OptionGroup):
raise optparse.OptionValueError("invalid %s option value: %s" %
(opt_str, arg))
self._lp.set('debug level', str(arg))
parser.values.debuglevel = int(arg)
def _set_realm(self, option, opt_str, arg, parser):
self._lp.set('realm', arg)