summaryrefslogtreecommitdiff
path: root/tools/buildman/cfgutil.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-02 10:38:00 -0500
committerTom Rini <trini@konsulko.com>2022-03-02 10:38:00 -0500
commitf861ffa660dc47c4017c220b94d10a64439d46a7 (patch)
tree7ba56091d7713bf04e940afa9a2f8adcaeeb2a16 /tools/buildman/cfgutil.py
parentf9a719e2954473f9be1f8c14a28288f943a00dd2 (diff)
parent642e51addf918e0dd1b901efaa9f5706c12365b7 (diff)
Merge branch '2022-03-02-enable-pylint-in-CI' into next
To quote the author: This series adds a new errors-only pylint check and adds it to the CI systems. It also fixes the current errors in the U-Boot Python code, disabling errors where it seems necessary. A small patch to buildman allows it to build sandbox without any changes to the default config file
Diffstat (limited to 'tools/buildman/cfgutil.py')
-rw-r--r--tools/buildman/cfgutil.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/buildman/cfgutil.py b/tools/buildman/cfgutil.py
index 4eba50868f5..ab74a8ef062 100644
--- a/tools/buildman/cfgutil.py
+++ b/tools/buildman/cfgutil.py
@@ -123,10 +123,10 @@ def adjust_cfg_file(fname, adjust_cfg):
C=val to set the value of C (val must have quotes if C is
a string Kconfig)
"""
- lines = tools.ReadFile(fname, binary=False).splitlines()
+ lines = tools.read_file(fname, binary=False).splitlines()
out_lines = adjust_cfg_lines(lines, adjust_cfg)
out = '\n'.join(out_lines) + '\n'
- tools.WriteFile(fname, out, binary=False)
+ tools.write_file(fname, out, binary=False)
def convert_list_to_dict(adjust_cfg_list):
"""Convert a list of config changes into the dict used by adjust_cfg_file()
@@ -219,7 +219,7 @@ def check_cfg_file(fname, adjust_cfg):
Returns:
str: None if OK, else an error string listing the problems
"""
- lines = tools.ReadFile(fname, binary=False).splitlines()
+ lines = tools.read_file(fname, binary=False).splitlines()
bad_cfgs = check_cfg_lines(lines, adjust_cfg)
if bad_cfgs:
out = [f'{cfg:20} {line}' for cfg, line in bad_cfgs]