From caa79f245b9bd9c1e99b50c7ab1ba726cd354acd Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 18 Jan 2018 14:00:13 +0100 Subject: [PATCH] Fix CI, also do not fail if `~/.local` directory does not exist. --- .gitlab-ci.yml | 4 ++-- flatisfy/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dbd5760..9244cde 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,11 +21,11 @@ test:2.7: image: "python:2.7" stage: "test" script: - - python -m flatisfy init-config | jq '.constraints.default.house_types = ["APART"] | .constraints.default.type = "RENT" | .constraints.default.postal_codes = ["75014"]' >! /tmp/config.json + - python -m flatisfy init-config | jq '.constraints.default.house_types = ["APART"] | .constraints.default.type = "RENT" | .constraints.default.postal_codes = ["75014"]' > /tmp/config.json - python -m flatisfy test --config /tmp/config.json test:3: image: "python:3" stage: "test" script: - - python -m flatisfy init-config | jq '.constraints.default.house_types = ["APART"] | .constraints.default.type = "RENT" | .constraints.default.postal_codes = ["75014"]' >! /tmp/config.json + - python -m flatisfy init-config | jq '.constraints.default.house_types = ["APART"] | .constraints.default.type = "RENT" | .constraints.default.postal_codes = ["75014"]' > /tmp/config.json - python -m flatisfy test --config /tmp/config.json diff --git a/flatisfy/config.py b/flatisfy/config.py index 79cc19d..19c82c0 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -271,7 +271,7 @@ def load_config(args=None, check_with_data=True): if not os.path.isdir(config_data["data_directory"]): LOGGER.info("Creating data directory according to config: %s", config_data["data_directory"]) - os.mkdir(config_data["data_directory"]) + os.makedirs(config_data["data_directory"]) if config_data["database"] is None: config_data["database"] = "sqlite:///" + os.path.join(