with statement doesn't exist in early python

pull/658/head
Steven Robertson 4 years ago
parent 39b55796c5
commit 371ef07683

@ -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
#

Loading…
Cancel
Save