python/join: 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/join.py

index d1a1b085883af4baceda72bc64f078b4eb827ea8..a50a409abfc4169268a11a4b1f70bc0d173375a5 100644 (file)
@@ -402,7 +402,7 @@ class dc_join(object):
     def drsuapi_connect(ctx):
         '''make a DRSUAPI connection to the naming master'''
         binding_options = "seal"
-        if int(ctx.lp.get("log level")) >= 4:
+        if ctx.lp.log_level() >= 4:
             binding_options += ",print"
         binding_string = "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options)
         ctx.drsuapi = drsuapi.drsuapi(binding_string, ctx.lp, ctx.creds)
@@ -868,7 +868,7 @@ class dc_join(object):
                 repl_creds = ctx.creds
 
             binding_options = "seal"
-            if int(ctx.lp.get("log level")) >= 5:
+            if ctx.lp.log_level() >= 5:
                 binding_options += ",print"
             repl = drs_utils.drs_Replicate(
                 "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options),