summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-14 15:53:43 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:45 -0600
commit3e4b51e8d6dc86c0ea80552a1d2e19756b19e4a1 (patch)
treefd3e6131f2e444d514bc1df338c18e01b1cf2524 /tools
parent1d0ebf7d636ea923cafb45d2b0f61200b26e4198 (diff)
downloadu-boot-3e4b51e8d6dc86c0ea80552a1d2e19756b19e4a1.tar.gz
u-boot-3e4b51e8d6dc86c0ea80552a1d2e19756b19e4a1.tar.bz2
u-boot-3e4b51e8d6dc86c0ea80552a1d2e19756b19e4a1.zip
tools: dtoc: Open all binary files in binary mode
Fix an open() statement to use binary mode, so that it works as expected with Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/dtoc/fdt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 9ad72f89ec..031b3a0084 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -469,7 +469,7 @@ class Fdt:
if self._fname:
self._fname = fdt_util.EnsureCompiled(self._fname)
- with open(self._fname) as fd:
+ with open(self._fname, 'rb') as fd:
self._fdt_obj = libfdt.Fdt(fd.read())
@staticmethod