diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-21 16:39:17 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-21 16:39:17 +0100 |
commit | a32194033a6dcfe368b7ff64789fa152f090e7e6 (patch) | |
tree | 874d2e1eae6dade466b41fe2a8773e2dc0519354 /source4/scripting/python/samba/samba3.py | |
parent | f06b083ff3498e9a2157fdab687e2600a9b8ca72 (diff) | |
download | samba-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.py | 12 |
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.""" |