Commit a28fa444 authored by Nicolas Wavrant's avatar Nicolas Wavrant

monitor: do not try to remove pid file if script is run without defining one

parent 4a992aaa
Pipeline #15325 failed with stage
in 0 seconds
......@@ -159,7 +159,8 @@ class MonitorPromiseLauncher(object):
except PromiseError as e:
# error was already logged
exit_code = 1
os.remove(self.config.pid_path)
if self.config.pid_path:
os.remove(self.config.pid_path)
self.logger.info("Finished promises.")
return exit_code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment