diff options
author | Paul Burton <paul.burton@imgtec.com> | 2017-09-14 14:34:43 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-07-10 14:50:50 -0600 |
commit | dffd56d1d270e4797e43272a6c9000b8b8aeaf29 (patch) | |
tree | bef4fb8c44874d9b2a8d5214a675f80fb8d63633 /test/py/test.py | |
parent | e3396ffd720877976141fa0b76a0b8ee9643d7d1 (diff) |
test/py: Make print statements python 3.x safe
In python 3.x print must be called as a function rather than used as a
statement. Update uses of print to the function call syntax in order to
be python 3.x safe.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py/test.py')
-rwxr-xr-x | test/py/test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/py/test.py b/test/py/test.py index 04baf8df3b..a5140945d4 100755 --- a/test/py/test.py +++ b/test/py/test.py @@ -7,6 +7,8 @@ # Wrapper script to invoke pytest with the directory name that contains the # U-Boot tests. +from __future__ import print_function + import os import os.path import sys @@ -26,7 +28,7 @@ except: traceback.print_exc() # Hint to the user that they likely simply haven't installed the required # dependencies. - print >>sys.stderr, ''' + print(''' exec(py.test) failed; perhaps you are missing some dependencies? -See test/py/README.md for the list.''' +See test/py/README.md for the list.''', file=sys.stderr) sys.exit(1) |