From: Matthieu Patou Date: Thu, 3 Jan 2013 22:34:13 +0000 (-0800) Subject: Tests: avoid adding python options that are functions in the env X-Git-Tag: ldb-1.1.15~77 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95fc53a37b9c75cbc1d13432887de095ff779a1e;p=thirdparty%2Fsamba.git Tests: avoid adding python options that are functions in the env This fix errors when running test --testenv --screen Signed-off-by: Matthieu Patou Reviewed-by: Andrew Bartlett --- diff --git a/selftest/wscript b/selftest/wscript index 4733dc17cd1..c7637a19ac5 100644 --- a/selftest/wscript +++ b/selftest/wscript @@ -6,6 +6,7 @@ import Scripting, os, Options, Utils, Environment, optparse, sys from samba_utils import * from samba_autoconf import * +import types def set_options(opt): @@ -114,7 +115,11 @@ def cmd_testonly(opt): # put all command line options in the environment as TESTENV_*=* for o in dir(Options.options): if o[0:1] != '_': - os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, '')) + val = getattr(Options.options, o, '') + if not issubclass(type(val), types.FunctionType) \ + and not issubclass(type(val), types.MethodType): + os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, '')) + binary_mapping = ('nmblookup3:nmblookup,' + 'nmblookup4:nmblookup4,' +