From 371ef076833ba10de62c064c043e9f02c534022f Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Tue, 18 Feb 2020 15:35:33 -0800 Subject: [PATCH] with statement doesn't exist in early python --- tests/ansible/integration/action/make_tmp_path.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ansible/integration/action/make_tmp_path.yml b/tests/ansible/integration/action/make_tmp_path.yml index f8dc01c0..73aa1187 100644 --- a/tests/ansible/integration/action/make_tmp_path.yml +++ b/tests/ansible/integration/action/make_tmp_path.yml @@ -94,8 +94,7 @@ from ansible.module_utils.basic import get_module_path path = get_module_path() + '/foo.txt' result['path'] = path - with open(path, 'w') as f: - f.write("bar") + open(path, 'w').write("bar") register: out - name: "Verify junk disappeared." @@ -137,8 +136,7 @@ from ansible.module_utils.basic import get_module_path path = get_module_path() + '/foo.txt' result['path'] = path - with open(path, 'w') as f: - f.write("bar") + open(path, 'w').write("bar") register: tmp_path #