Commit 0d0acc6d authored by Antoine Millet's avatar Antoine Millet

Now create jobs directory if it doesn't exists

parent 25718769
......@@ -194,6 +194,20 @@ class Handler(BasePlugin):
self.commands = set()
#: jobs manager (different from MainLoop.jobs_manager)
try:
os.makedirs(self.main.config.jobs_store_path, mode=0755)
except OSError as e:
if e.errno == 17:
pass # Ignore existing directory
else:
logger.critical('Cannot create jobs directory: %s', e)
self.main.stop()
raise
except Exception as e:
logger.critical('Cannot create jobs directory: %s', e)
self.main.stop()
raise
try:
self.jobs_manager = JobsManager(logger, NodeJobsManagerInterface(self),
JobsStore(self.main.config.jobs_store_path))
......
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