Removes useless empty string write

It s not necessary to write an empty string for the file to be created.
reviewable/pr18780/r1
Michel Blanc 12 years ago
parent 05d45fc1fa
commit 8b5df82b74

@ -238,7 +238,6 @@ def main():
if not os.access(sysctl_args['sysctl_file'], os.W_OK): if not os.access(sysctl_args['sysctl_file'], os.W_OK):
try: try:
f = open(sysctl_args['sysctl_file'],'w') f = open(sysctl_args['sysctl_file'],'w')
f.write('')
f.close() f.close()
except IOError, e: except IOError, e:
module.fail_json(msg='unable to create supplied sysctl file (destination directory probably missing)') module.fail_json(msg='unable to create supplied sysctl file (destination directory probably missing)')

Loading…
Cancel
Save