Commit 5db300f0 authored by Vincent Pelletier's avatar Vincent Pelletier

Simplify empty file creation.

parent 2aedeb4b
......@@ -73,11 +73,9 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
configuration.set("agent", "software_list",
parameter_dict["software_list"])
configuration.set("agent", "log_directory", self.options["log_directory"])
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.write('')
state.close()
state_file = self.options["state_file"]
configuration.set("agent", "state_file", state_file)
open(state_file, "a").close()
configuration.set("agent", "path_file", self.options["path_file"])
configuration.add_section("software_uri")
software_list = json.loads(parameter_dict["software_list"])
......
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