summaryrefslogtreecommitdiff
path: root/python/samba
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-09-07 11:26:04 +1200
committerKarolin Seeger <kseeger@samba.org>2017-09-14 17:48:27 +0200
commit668cc39e320aeb30641580a1fcab39c108bd9c26 (patch)
tree6172a66a28f9da51b61c252aecbf498c343b6de4 /python/samba
parentc7f3f20590971d2777b81302484e32b595d109d5 (diff)
downloadsamba-668cc39e320aeb30641580a1fcab39c108bd9c26.tar.gz
python: Allow debug classes to be specified on the command line for python tools
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13017 Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Sep 7 10:43:33 CEST 2017 on sn-devel-144 (cherry picked from commit c938f61d332de0323cb135b201367f90f08d76a8)
Diffstat (limited to 'python/samba')
-rw-r--r--python/samba/getopt.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/getopt.py b/python/samba/getopt.py
index 9e1fb83167a..f166469e77f 100644
--- a/python/samba/getopt.py
+++ b/python/samba/getopt.py
@@ -40,7 +40,7 @@ class SambaOptions(optparse.OptionGroup):
type=str, metavar="FILE", help="Configuration file",
callback=self._load_configfile)
self.add_option("-d", "--debuglevel", action="callback",
- type=int, metavar="DEBUGLEVEL", help="debug level",
+ type=str, metavar="DEBUGLEVEL", help="debug level",
callback=self._set_debuglevel)
self.add_option("--option", action="callback",
type=str, metavar="OPTION",
@@ -64,8 +64,8 @@ class SambaOptions(optparse.OptionGroup):
if arg < 0:
raise optparse.OptionValueError("invalid %s option value: %s" %
(opt_str, arg))
- self._lp.set('debug level', str(arg))
- parser.values.debuglevel = int(arg)
+ self._lp.set('debug level', arg)
+ parser.values.debuglevel = arg
def _set_realm(self, option, opt_str, arg, parser):
self._lp.set('realm', arg)