From 86f2381c6c47c72bdbfe402f98413892e309ed82 Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Sat, 7 Jan 2017 16:30:26 +0100 Subject: [PATCH] GHI-#14 Join base snowblocks directory to get the absolute path --- snowsaw/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snowsaw/cli.py b/snowsaw/cli.py index 1596b9f..040465f 100644 --- a/snowsaw/cli.py +++ b/snowsaw/cli.py @@ -83,14 +83,14 @@ def main(): if os.path.isdir(os.path.join(options.snowblocks_directory[0], snowblock))] for snowblock in snowblocks: - if os.path.isfile(os.path.join(snowblock, snowblock_config_filename)): + if os.path.isfile(os.path.join(options.snowblocks_directory[0], snowblock, snowblock_config_filename)): log.info("❄ {}".format(snowblock)) - tasks = read_config(os.path.join(snowblock, snowblock_config_filename)) + tasks = read_config(os.path.join(options.snowblocks_directory[0], snowblock, snowblock_config_filename)) if not isinstance(tasks, list): raise ReadingError("Configuration file must be a list of tasks") - dispatcher = Dispatcher(snowblock) + dispatcher = Dispatcher(os.path.join(options.snowblocks_directory[0], snowblock)) success = dispatcher.dispatch(tasks) if success: log.info("==> All tasks executed successfully\n")