diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-24 08:42:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-24 08:42:06 -0400 |
commit | 7208396bbf1df1c7a85d263b7ff054e6b45d8240 (patch) | |
tree | 41b20866e0a94e34ca76e54a2745ca7a5ba0889b /tools/patman/tools.py | |
parent | 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (diff) |
Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.
Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/patman/tools.py')
-rw-r--r-- | tools/patman/tools.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py index d41115a22c4..b50370dfe8d 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -114,16 +114,14 @@ def SetInputDirs(dirname): indir = dirname tout.Debug("Using input directories %s" % indir) -def GetInputFilename(fname, allow_missing=False): +def GetInputFilename(fname): """Return a filename for use as input. Args: fname: Filename to use for new file - allow_missing: True if the filename can be missing Returns: - The full path of the filename, within the input directory, or - None on error + The full path of the filename, within the input directory """ if not indir or fname[:1] == '/': return fname @@ -132,8 +130,6 @@ def GetInputFilename(fname, allow_missing=False): if os.path.exists(pathname): return pathname - if allow_missing: - return None raise ValueError("Filename '%s' not found in input path (%s) (cwd='%s')" % (fname, ','.join(indir), os.getcwd())) @@ -274,7 +270,7 @@ def ReadFile(fname, binary=True): #(fname, len(data), len(data))) return data -def WriteFile(fname, data, binary=True): +def WriteFile(fname, data): """Write data into a file. Args: @@ -283,7 +279,7 @@ def WriteFile(fname, data, binary=True): """ #self._out.Info("Write file '%s' size %d (%#0x)" % #(fname, len(data), len(data))) - with open(Filename(fname), binary and 'wb' or 'w') as fd: + with open(Filename(fname), 'wb') as fd: fd.write(data) def GetBytes(byte, size): |