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/dtoc.py | |
parent | b2e73125b20a8f15d031d05dfec572b5014bc7fe (diff) |
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/dtoc.py')
-rwxr-xr-x | tools/dtoc/dtoc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py index 2277af9bf7..c1a1d3534d 100755 --- a/tools/dtoc/dtoc.py +++ b/tools/dtoc/dtoc.py @@ -25,6 +25,8 @@ options. For more information about the use of this options and tool please see doc/driver-model/of-plat.txt """ +from __future__ import print_function + from optparse import OptionParser import os import sys @@ -64,11 +66,11 @@ def run_tests(args): suite = unittest.TestLoader().loadTestsFromTestCase(module) suite.run(result) - print result + print(result) for _, err in result.errors: - print err + print(err) for _, err in result.failures: - print err + print(err) def RunTestCoverage(): """Run the tests and check that we get 100% coverage""" |