Message ID | 20170914213450.28754-8-paul.burton@imgtec.com |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
Series | test/py: Fixes for python 3.x | expand |
On 14 September 2017 at 15:34, Paul Burton <paul.burton@imgtec.com> wrote: > 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> > --- > > Changes in v2: None > > test/py/tests/test_hush_if_test.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm, thanks!
diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py index c8f4208d31..cdad22b429 100644 --- a/test/py/tests/test_hush_if_test.py +++ b/test/py/tests/test_hush_if_test.py @@ -149,7 +149,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)