Fix CI, also do not fail if `~/.local` directory does not exist.

This commit is contained in:
Lucas Verney 2018-01-18 14:00:13 +01:00
parent da0252974f
commit caa79f245b
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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(