summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/samba3.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 16:39:17 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 16:39:17 +0100
commita32194033a6dcfe368b7ff64789fa152f090e7e6 (patch)
tree874d2e1eae6dade466b41fe2a8773e2dc0519354 /source4/scripting/python/samba/samba3.py
parentf06b083ff3498e9a2157fdab687e2600a9b8ca72 (diff)
downloadsamba-a32194033a6dcfe368b7ff64789fa152f090e7e6.tar.gz
samba-a32194033a6dcfe368b7ff64789fa152f090e7e6.tar.xz
samba-a32194033a6dcfe368b7ff64789fa152f090e7e6.zip
Move tests for ParamFile.
Diffstat (limited to 'source4/scripting/python/samba/samba3.py')
-rw-r--r--source4/scripting/python/samba/samba3.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/samba3.py b/source4/scripting/python/samba/samba3.py
index 083386a0c59..1dc90bfcf3e 100644
--- a/source4/scripting/python/samba/samba3.py
+++ b/source4/scripting/python/samba/samba3.py
@@ -709,6 +709,18 @@ class ParamFile(object):
def __getitem__(self, section):
return self._sections[section]
+ def get_section(self, section):
+ return self._sections.get(section)
+
+ def add_section(self, section):
+ self._sections[self._sanitize_name(section)] = {}
+
+ def set_string(self, name, value):
+ self._sections["global"][name] = value
+
+ def get_string(self, name):
+ return self._sections["global"].get(name)
+
class Samba3(object):
"""Samba 3 configuration and state data reader."""