diff options
author | Simon Glass <sjg@chromium.org> | 2019-05-17 22:00:31 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-10 16:52:58 -0600 |
commit | 90a8132f4de673dbb35ffee265df93b32d6582ca (patch) | |
tree | 2f08c4eb67e6dcd3c8389b209ef3fa115378ca2d /tools/dtoc/test_dtoc.py | |
parent | b2e73125b20a8f15d031d05dfec572b5014bc7fe (diff) | |
download | u-boot-90a8132f4de673dbb35ffee265df93b32d6582ca.tar.gz |
dtoc: Adjust code for Python 3
Update a few things in this tool so that they support Python 3:
- print statements
- iteritems()
- xrange()
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_dtoc.py')
-rw-r--r-- | tools/dtoc/test_dtoc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index cb6d6e7baf..ae59a0a52a 100644 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -8,6 +8,8 @@ This includes unit tests for some functions and functional tests for the dtoc tool. """ +from __future__ import print_function + import collections import os import struct @@ -97,7 +99,7 @@ class TestDtoc(unittest.TestCase): if expected != actual: self._WritePythonString('/tmp/binman.expected', expected) self._WritePythonString('/tmp/binman.actual', actual) - print 'Failures written to /tmp/binman.{expected,actual}' + print('Failures written to /tmp/binman.{expected,actual}') self.assertEquals(expected, actual) def test_name(self): |