s4-test: fixed a problem with very verbose NDR debug
authorAndrew Tridgell <tridge@samba.org>
Wed, 6 Apr 2011 05:34:22 +0000 (15:34 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 6 Apr 2011 06:58:05 +0000 (08:58 +0200)
lp.get("log level") returns a string, not an integer. It needs to be
cast to an integer for comparison with a number

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr  6 08:58:05 CEST 2011 on sn-devel-104

source4/scripting/bin/samba_spnupdate
source4/scripting/python/samba/join.py
source4/scripting/python/samba/netcmd/drs.py

index 169c12ab0066ece7dfce0ac06afeb0ea51eacf39..1794f2bd267dee6ee3ac507622c89e6a6092ab2b 100755 (executable)
@@ -196,7 +196,7 @@ def call_rodc_update(d):
     server = cldap_ret.pdc_dns_name
     try:
         binding_options = "seal"
-        if lp.get("log level") >= 5:
+        if int(lp.get("log level")) >= 5:
             binding_options += ",print"
         drs = drsuapi.drsuapi('ncacn_ip_tcp:%s[%s]' % (server, binding_options), lp, creds)
         (drs_handle, supported_extensions) = drs_utils.drs_DsBind(drs)
index 401f262154e755450f35ad1f389f5bbd970b26fb..c0aee714070e1a878312ded9174a0e4dfac8419a 100644 (file)
@@ -236,7 +236,7 @@ class dc_join(object):
     def drsuapi_connect(ctx):
         '''make a DRSUAPI connection to the server'''
         binding_options = "seal"
-        if ctx.lp.get("log level") >= 5:
+        if int(ctx.lp.get("log level")) >= 5:
             binding_options += ",print"
         binding_string = "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options)
         ctx.drsuapi = drsuapi.drsuapi(binding_string, ctx.lp, ctx.creds)
@@ -455,7 +455,7 @@ class dc_join(object):
                 repl_creds = ctx.creds
 
             binding_options = "seal"
-            if ctx.lp.get("debug level") >= 5:
+            if int(ctx.lp.get("log level")) >= 5:
                 binding_options += ",print"
             repl = drs_utils.drs_Replicate(
                 "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options),
index 69e164ef3e6c77631d37022828817584940ce5ee..56c0e39a59118b1d449799e16689201e74bd6518 100644 (file)
@@ -38,7 +38,7 @@ import common
 def drsuapi_connect(ctx):
     '''make a DRSUAPI connection to the server'''
     binding_options = "seal"
-    if ctx.lp.get("log level") >= 5:
+    if int(ctx.lp.get("log level")) >= 5:
         binding_options += ",print"
     binding_string = "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options)
     try: