diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-09-12 20:57:10 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-13 14:53:24 +0200 |
commit | 4e87a8419ca662d35018f0d00c80f3d816473cbc (patch) | |
tree | be435e4591c7e612484928b2a1f4a00c87109cf8 /source4/scripting | |
parent | 924b2d5b7fdfc562765ffe7181ffb479bb05ae84 (diff) | |
download | samba-4e87a8419ca662d35018f0d00c80f3d816473cbc.tar.gz samba-4e87a8419ca662d35018f0d00c80f3d816473cbc.tar.bz2 samba-4e87a8419ca662d35018f0d00c80f3d816473cbc.zip |
s4:upgrade_from_s3 - restore "get_testparm_var" method
This has accidentally been removed by commit 8268c2d4e231b05b439bc70331b75342b35daa4e.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 5 |
1 files changed, 4 insertions, 1 deletions
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""" |