logicmonitor: remove closed statement, used for py2.4 compat (#25240)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
26349033c1
commit
8a4a04b016
1 changed files with 2 additions and 4 deletions
|
@ -909,15 +909,13 @@ class Collector(LogicMonitor):
|
|||
self.module.run_command("mkdir " + self.installdir)
|
||||
|
||||
try:
|
||||
f = open(installfilepath, "w")
|
||||
installer = (self.do("logicmonitorsetup",
|
||||
{"id": self.id,
|
||||
"arch": arch}))
|
||||
f.write(installer)
|
||||
f.closed
|
||||
with open(installfilepath, "w") as write_file:
|
||||
write_file.write(installer)
|
||||
except:
|
||||
self.fail(msg="Unable to open installer file for writing")
|
||||
f.closed
|
||||
else:
|
||||
self.module.debug("Collector installer already exists")
|
||||
return installfilepath
|
||||
|
|
Loading…
Reference in a new issue