3 # vim: sw=4 ts=4 expandtab ai
11 ignore_dirs = ['/dev', '/proc', '/sys', '/mnt']
19 from ConfigParser import ConfigParser, NoOptionError
21 class FindITConfig(ConfigParser):
22 def __init__(self, config):
23 ConfigParser.__init__(self)
24 if isinstance(config, basestring):
30 def __getitem__(self, item):
32 return self.get('DEFAULT', item)
34 if self.has_section(item):
38 return self.get(self._section, item)
40 def __setitem__(self, item, value):
41 return self.set(self._section, item, str(value))
43 def get(self, section, option):
44 value = ConfigParser.get(self, section, option)
50 from StringIO import StringIO
51 config = FindITConfig(StringIO(CONF))