diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-19 17:49:05 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-07-24 09:34:11 -0600 |
commit | 42d42cf1d9c6daca09c40c06b7848dd550f0810b (patch) | |
tree | 67333367e0a138db0307f06d5d0534cc8886da1e /tools/buildman/bsettings.py | |
parent | 529957c3157c7667d9ccfbf539ccad7316a37f83 (diff) |
buildman: Convert camel case in bsettings.py
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/bsettings.py')
-rw-r--r-- | tools/buildman/bsettings.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py index 029c401fd2..f7f8276e62 100644 --- a/tools/buildman/bsettings.py +++ b/tools/buildman/bsettings.py @@ -7,7 +7,7 @@ import io config_fname = None -def Setup(fname=''): +def setup(fname=''): """Set up the buildman settings module by reading config files Args: @@ -23,15 +23,15 @@ def Setup(fname=''): config_fname = '%s/.buildman' % os.getenv('HOME') if not os.path.exists(config_fname): print('No config file found ~/.buildman\nCreating one...\n') - CreateBuildmanConfigFile(config_fname) + create_buildman_config_file(config_fname) print('To install tool chains, please use the --fetch-arch option') if config_fname: settings.read(config_fname) -def AddFile(data): +def add_file(data): settings.readfp(io.StringIO(data)) -def GetItems(section): +def get_items(section): """Get the items from a section of the config. Args: @@ -47,7 +47,7 @@ def GetItems(section): except: raise -def GetGlobalItemValue(name): +def get_global_item_value(name): """Get an item from the 'global' section of the config. Args: @@ -58,7 +58,7 @@ def GetGlobalItemValue(name): """ return settings.get('global', name, fallback=None) -def SetItem(section, tag, value): +def set_item(section, tag, value): """Set an item and write it back to the settings file""" global settings global config_fname @@ -68,7 +68,7 @@ def SetItem(section, tag, value): with open(config_fname, 'w') as fd: settings.write(fd) -def CreateBuildmanConfigFile(config_fname): +def create_buildman_config_file(config_fname): """Creates a new config file with no tool chain information. Args: |