From 184aee76cada5c494bc4aa47ee199e3216e5d4e5 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 27 Apr 2021 09:54:52 +0200 Subject: [PATCH] make yaml loading safe --- scripts/build_heat_demand.py | 2 +- scripts/build_population_layouts.py | 2 +- scripts/build_solar_thermal_profiles.py | 2 +- scripts/build_temperature_profiles.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build_heat_demand.py b/scripts/build_heat_demand.py index 865f12bd..169e81f4 100644 --- a/scripts/build_heat_demand.py +++ b/scripts/build_heat_demand.py @@ -11,7 +11,7 @@ if 'snakemake' not in globals(): import yaml snakemake = Dict() with open('config.yaml') as f: - snakemake.config = yaml.load(f) + snakemake.config = yaml.safe_load(f) snakemake.input = Dict() snakemake.output = Dict() diff --git a/scripts/build_population_layouts.py b/scripts/build_population_layouts.py index 5093e1b4..8e9bb5ab 100644 --- a/scripts/build_population_layouts.py +++ b/scripts/build_population_layouts.py @@ -15,7 +15,7 @@ if 'snakemake' not in globals(): import yaml snakemake = Dict() with open('config.yaml') as f: - snakemake.config = yaml.load(f) + snakemake.config = yaml.safe_load(f) snakemake.input = Dict() snakemake.output = Dict() diff --git a/scripts/build_solar_thermal_profiles.py b/scripts/build_solar_thermal_profiles.py index c26266aa..be5af409 100644 --- a/scripts/build_solar_thermal_profiles.py +++ b/scripts/build_solar_thermal_profiles.py @@ -11,7 +11,7 @@ if 'snakemake' not in globals(): import yaml snakemake = Dict() with open('config.yaml') as f: - snakemake.config = yaml.load(f) + snakemake.config = yaml.safe_load(f) snakemake.input = Dict() snakemake.output = Dict() diff --git a/scripts/build_temperature_profiles.py b/scripts/build_temperature_profiles.py index a55bd606..82ff431e 100644 --- a/scripts/build_temperature_profiles.py +++ b/scripts/build_temperature_profiles.py @@ -11,7 +11,7 @@ if 'snakemake' not in globals(): import yaml snakemake = Dict() with open('config.yaml') as f: - snakemake.config = yaml.load(f) + snakemake.config = yaml.safe_load(f) snakemake.input = Dict() snakemake.output = Dict()