3 # vim: sw=4 ts=4 expandtab ai
11 ignore_dirs = ['/dev', '/proc', '/sys', '/mnt']
20 from ConfigParser import ConfigParser, NoOptionError
22 class FindITConfig(ConfigParser):
23 def __init__(self, config):
24 ConfigParser.__init__(self)
25 if isinstance(config, basestring):
31 def __getitem__(self, item):
33 return self.get('DEFAULT', item)
35 if self.has_section(item):
39 return self.get(self._section, item)
41 def __setitem__(self, item, value):
42 return self.set(self._section, item, str(value))
44 def get(self, section, option):
45 value = ConfigParser.get(self, section, option)
51 from StringIO import StringIO
52 config = FindITConfig(StringIO(CONF))