]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerStefan Metzmacher <metze@samba.org>
Mon, 24 Oct 2016 08:56:12 +0000 (10:56 +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>
(cherry picked from commit 92178f02bd09277f783eb68b476cfd1452c7f9ef)

python/samba/join.py

index 6df337c55c0dbd2b0755b1bf3fd1872e0f134cb4..18630a1b36d2568635c7c9fa759a9194ca35fa48 100644 (file)
@@ -373,7 +373,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)
@@ -810,7 +810,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),