Skip to content

Commit

Permalink
Fix #55
Browse files Browse the repository at this point in the history
Signed-off-by: Valentijn <valentijn@posteo.net>
  • Loading branch information
guitmz authored and ValentijnvdBeek committed Apr 27, 2019
1 parent 2e01f8f commit 066a1c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clay/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ def _load_config(self):
self._config = yaml.load(settings_file.read())

# Load the configuration from Setuptools' ResourceManager API
self._default_config = yaml.load(pkg_resources.resource_string(__name__, "config.yaml"))
self._default_config = yaml.safe_load(pkg_resources.resource_string(__name__, "config.yaml"))

# We only either the user colour or the default colours to ease parsing logic.
if os.path.exists(self._colours_file_path):
with open(self._colours_file_path, 'r') as colours_file:
self.colours_config = yaml.load(colours_file.read())
self.colours_config = yaml.safe_load(colours_file.read())
else:
self.colours_config = yaml.load(pkg_resources.resource_string(__name__, "colours.yaml"))
self.colours_config = yaml.safe_load(pkg_resources.resource_string(__name__, "colours.yaml"))

def _load_cache(self):
"""
Expand All @@ -110,7 +110,7 @@ def _commit_edits(self, config):
"""
self._config.update(config)
with open(self._config_file_path, 'w') as settings_file:
settings_file.write(yaml.dump(self._config, default_flow_style=False))
settings_file.write(yaml.safe_dump(self._config, default_flow_style=False))

def get(self, key, *sections):
"""
Expand Down

0 comments on commit 066a1c3

Please sign in to comment.