aboutsummaryrefslogtreecommitdiff
path: root/tools/dtoc/test_fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-17 22:00:31 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:58 -0600
commit90a8132f4de673dbb35ffee265df93b32d6582ca (patch)
tree2f08c4eb67e6dcd3c8389b209ef3fa115378ca2d /tools/dtoc/test_fdt.py
parentb2e73125b20a8f15d031d05dfec572b5014bc7fe (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/test_fdt.py')
-rwxr-xr-xtools/dtoc/test_fdt.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 8d70dd2a29..2d1d7dc452 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -4,6 +4,8 @@
# Written by Simon Glass <sjg@chromium.org>
#
+from __future__ import print_function
+
from optparse import OptionParser
import glob
import os
@@ -535,11 +537,11 @@ def RunTests(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)
if __name__ != '__main__':
sys.exit(1)