1 # Copyright (c) 2012 The Chromium OS Authors.
3 # SPDX-License-Identifier: GPL-2.0+
12 """Set up the buildman settings module by reading config files
15 config_fname: Config filename to read ('' for default)
20 settings = ConfigParser.SafeConfigParser()
23 if config_fname == '':
24 config_fname = '%s/.buildman' % os.getenv('HOME')
26 settings.read(config_fname)
29 settings.readfp(StringIO.StringIO(data))
31 def GetItems(section):
32 """Get the items from a section of the config.
35 section: name of section to retrieve
38 List of (name, value) tuples for the section
41 return settings.items(section)
42 except ConfigParser.NoSectionError as e: