bugfix: use correct function close calls

pull/18777/head
Konstantin Manna 9 years ago committed by Matt Clay
parent f10de6e47b
commit 19da801665

@ -211,7 +211,7 @@ def download_request(module, name, apiid, apikey, cert_type):
body = response.read() body = response.read()
cert_file = open(cert_file_path, 'w') cert_file = open(cert_file_path, 'w')
cert_file.write(body) cert_file.write(body)
cert_file.close cert_file.close()
os.chmod(cert_file_path, 0600) os.chmod(cert_file_path, 0600)
except: except:
module.fail_json("Could not write to certificate file") module.fail_json("Could not write to certificate file")

@ -222,7 +222,7 @@ class Zone(object):
node = open('%s/root/etc/nodename' % self.path, 'w') node = open('%s/root/etc/nodename' % self.path, 'w')
node.write(self.name) node.write(self.name)
node.close node.close()
id = open('%s/root/etc/.sysIDtool.state' % self.path, 'w') id = open('%s/root/etc/.sysIDtool.state' % self.path, 'w')
id.write('1 # System previously configured?\n') id.write('1 # System previously configured?\n')

Loading…
Cancel
Save