mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
logicmonitor: remove closed statement, used for py2.4 compat (#25240)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
René Moser
parent
26349033c1
commit
8a4a04b016
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user