summaryrefslogtreecommitdiff
path: root/test/py/tests/test_hush_if_test.py
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-09-14 14:34:49 -0700
committerSimon Glass <sjg@chromium.org>2018-07-10 14:50:50 -0600
commit9f9e8a4dda0b09574a9188a5576a8768e3d818be (patch)
treec665199f0971fb9c4c561425eb8ab7314431bbd5 /test/py/tests/test_hush_if_test.py
parent57bf9bea340690724df9de8ad82bf0d716efaa5b (diff)
test/py: hush_if_test: Use open() in place of file()
In python 3.x the file() function has been removed. Use open() instead, which works on both python 2.x & 3.x, and is described as the preferred method of opening a file by python 2.x documentation anyway. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py/tests/test_hush_if_test.py')
-rw-r--r--test/py/tests/test_hush_if_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py
index 1196e0a53f..bba8d41d96 100644
--- a/test/py/tests/test_hush_if_test.py
+++ b/test/py/tests/test_hush_if_test.py
@@ -148,7 +148,7 @@ def test_hush_if_test_host_file_exists(u_boot_console):
exec_hush_if(u_boot_console, expr, False)
try:
- with file(test_file, 'wb'):
+ with open(test_file, 'wb'):
pass
assert os.path.exists(test_file)