From f79c1ee4bf974a12d4a3994b40109b5a0836ff0f Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Tue, 19 Jun 2007 21:12:07 +0200 Subject: [PATCH] Check if pid file exists before removing it darcs-hash:20070619191207-86b55-70c379307a268b19e55bffd4203e19351e63c467.gz --- src/jcl/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jcl/runner.py b/src/jcl/runner.py index e53e1ac..1ee0dc7 100644 --- a/src/jcl/runner.py +++ b/src/jcl/runner.py @@ -194,7 +194,8 @@ class JCLRunner(object): run_func() self.logger.debug(self.component_name + " is exiting") finally: - os.remove(self.pid_file) + if os.path.exists(self.pid_file): + os.remove(self.pid_file) def run(self): def run_func():