From a32194033a6dcfe368b7ff64789fa152f090e7e6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 21 Dec 2008 16:39:17 +0100 Subject: Move tests for ParamFile. --- source4/scripting/python/samba/samba3.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/scripting/python/samba/samba3.py') 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.""" -- cgit