From 4e87a8419ca662d35018f0d00c80f3d816473cbc Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 12 Sep 2011 20:57:10 +0200 Subject: s4:upgrade_from_s3 - restore "get_testparm_var" method This has accidentally been removed by commit 8268c2d4e231b05b439bc70331b75342b35daa4e. Signed-off-by: Andrew Bartlett --- source4/scripting/python/samba/netcmd/domain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 9490001404..4211b06802 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -54,7 +54,10 @@ from samba.dsdb import ( DS_DOMAIN_FUNCTION_2008_R2, ) - +def get_testparm_var(testparm, varname): + cmd = "%s -s -l --parameter-name='%s' 2>/dev/null" % (testparm, varname) + output = os.popen(cmd, 'r').readline() + return output.strip() class cmd_domain_export_keytab(Command): """Dumps kerberos keys of the domain into a keytab""" -- cgit