patman: Convert camel case in tools.py
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index eee8113..e8a531e 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -135,7 +135,7 @@
global builder
if options.full_help:
- tools.PrintFullHelp(
+ tools.print_full_help(
os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README')
)
return 0
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index c2e0b0b..b920818 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -422,7 +422,7 @@
if arg.startswith('O='):
out_dir = arg[2:]
fname = os.path.join(cwd or '', out_dir, 'u-boot')
- tools.WriteFile(fname, b'U-Boot')
+ tools.write_file(fname, b'U-Boot')
if type(commit) is not str:
stderr = self._error.get((brd.target, commit.sequence))
if stderr:
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 2751377..43b0121 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -607,7 +607,7 @@
def testPrepareOutputSpace(self):
def _Touch(fname):
- tools.WriteFile(os.path.join(base_dir, fname), b'')
+ tools.write_file(os.path.join(base_dir, fname), b'')
base_dir = tempfile.mkdtemp()
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index adc75a7..d88c155 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -201,11 +201,11 @@
# We'll use MakeArgs() to provide this
pass
elif full_path:
- env[b'CROSS_COMPILE'] = tools.ToBytes(
+ env[b'CROSS_COMPILE'] = tools.to_bytes(
wrapper + os.path.join(self.path, self.cross))
else:
- env[b'CROSS_COMPILE'] = tools.ToBytes(wrapper + self.cross)
- env[b'PATH'] = tools.ToBytes(self.path) + b':' + env[b'PATH']
+ env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross)
+ env[b'PATH'] = tools.to_bytes(self.path) + b':' + env[b'PATH']
env[b'LC_ALL'] = b'C'
@@ -504,7 +504,7 @@
url = '%s/%s/%s/' % (base, arch, version)
print('Checking: %s' % url)
response = urllib.request.urlopen(url)
- html = tools.ToString(response.read())
+ html = tools.to_string(response.read())
parser = MyHTMLParser(fetch_arch)
parser.feed(html)
if fetch_arch == 'list':
@@ -571,7 +571,7 @@
os.mkdir(dest)
# Download the tar file for this toolchain and unpack it
- tarfile, tmpdir = tools.Download(url, '.buildman')
+ tarfile, tmpdir = tools.download(url, '.buildman')
if not tarfile:
return 1
print(col.Color(col.GREEN, 'Unpacking to: %s' % dest), end=' ')