python/drs_utils: do not attempt to parse log level, use parsed value
authorChristian Ambach <ambi@samba.org>
Tue, 13 Sep 2016 08:49:47 +0000 (10:49 +0200)
committerChristian Ambach <ambi@samba.org>
Wed, 14 Sep 2016 17:31:21 +0000 (19:31 +0200)
The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/drs_utils.py

index 6c8afae7e90e3e27dbef2f4a3c6872ca343be0f1..07fc05af2469835bc4e31f08b7bb096b32186867 100644 (file)
@@ -44,7 +44,7 @@ def drsuapi_connect(server, lp, creds):
     """
 
     binding_options = "seal"
-    if int(lp.get("log level")) >= 5:
+    if lp.log_level() >= 5:
         binding_options += ",print"
     binding_string = "ncacn_ip_tcp:%s[%s]" % (server, binding_options)
     try: