From 1e5c62ef9b93a682dca25810e4b72c5cb38f5f5f Mon Sep 17 00:00:00 2001 From: Will Holland Date: Wed, 30 Sep 2015 22:19:51 +0100 Subject: Fix last fix which was stupid --- source/configure.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/configure.py b/source/configure.py index 7e62dfd..c342483 100644 --- a/source/configure.py +++ b/source/configure.py @@ -16,11 +16,13 @@ def validate_config(config,*keys): def load_slave_type_configs(): ''' load the slave type configs to know which slaves to connect to''' import yaml, os + REPO_DIR = 'ciatconfig/slave-types' slave_types = [] - for slavetype in os.listdir('ciatconfig/slave-types'): + for slavetype in os.listdir(REPO_DIR): if not slavetype.endswith('.yaml'): continue - with open(slavetype, 'r') as f: - config = yaml.load('ciatconfig/slave-types/%s' % f) + slavetype_path = os.path.join(REPO_DIR,slavetype) + with open(slavetype_path, 'r') as f: + config = yaml.load(f) validate_config(config, 'name','arch') slave_types.append(config) return slave_types @@ -28,11 +30,13 @@ def load_slave_type_configs(): def load_pipeline_configs(): ''' load the pipelines ''' import yaml, os + REPO_DIR = 'ciatconfig/slave-types' pipelines = [] - for pipeline in os.listdir('ciatconfig/pipelines'): + for pipeline in os.listdir(REPO_DIR): if not pipeline.endswith('.yaml'): continue - with open(pipeline, 'r') as f: - config = yaml.load('ciatconfig/pipelines/%s' % f) + pipeline_path = os.path.join(REPO_DIR,pipeline) + with open(pipeline_path, 'r') as f: + config = yaml.load(f) validate_config(config, 'name', 'candidate-refs', -- cgit v1.2.1