Commit 4e1bb95f authored by Yingjie Xu's avatar Yingjie Xu

Do not overwrite state file if exists.

parent 7ada3c77
...@@ -76,6 +76,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe): ...@@ -76,6 +76,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
self.parameter_dict["software_list"]) self.parameter_dict["software_list"])
configuration.set("agent", "log_directory", self.options["log_directory"]) configuration.set("agent", "log_directory", self.options["log_directory"])
configuration.set("agent", "state_file", self.options["state_file"]) configuration.set("agent", "state_file", self.options["state_file"])
if not os.path.exists(self.options["state_file"]):
state = open(self.options["state_file"], "w") state = open(self.options["state_file"], "w")
state.write('') state.write('')
state.close() state.close()
......
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