1 # Copyright (c) 2012 The Chromium OS Authors.
3 # SPDX-License-Identifier: GPL-2.0+
11 """Set up the buildman settings module by reading config files
14 config_fname: Config filename to read ('' for default)
19 settings = ConfigParser.SafeConfigParser()
21 if config_fname == '':
22 config_fname = '%s/.buildman' % os.getenv('HOME')
24 settings.read(config_fname)
26 def GetItems(section):
27 """Get the items from a section of the config.
30 section: name of section to retrieve
33 List of (name, value) tuples for the section
36 return settings.items(section)
37 except ConfigParser.NoSectionError as e:
39 print ("Warning: No tool chains - please add a [toolchain] section "
40 "to your buildman config file %s. See README for details" %