Skip to content

Commit

Permalink
use the recommended yaml.safe_load function
Browse files Browse the repository at this point in the history
reason: with pyyaml >= 5, the load function without Loader is deprecated.
Even if we do not use version 5 for now, we should use good practices.
https://pyyaml.org/wiki/PyYAMLDocumentation#loading-yaml
yaml/pyyaml#257
  • Loading branch information
fblackburn1 committed Apr 16, 2019
1 parent 41f128d commit 2eeb8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wazo_plugind/db.py
@@ -1,4 +1,4 @@
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file)
# Copyright 2017-2019 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

import logging
Expand Down Expand Up @@ -264,7 +264,7 @@ def is_installed(self, version=None):
def metadata(self):
if not self._metadata:
with open(self.metadata_filename, 'r') as f:
self._metadata = yaml.load(f)
self._metadata = yaml.safe_load(f)

return self._metadata

Expand Down

0 comments on commit 2eeb8cd

Please sign in to comment.