From b9b5dbc073630b53bd9c435b77e4c6744e4ab4df Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 8 Mar 2019 13:50:53 +0100 Subject: Use yaml.safe_load_all load_all is deprecated. A safe YAML subset is fine for our purpose. See https://msg.pyyaml.org/load --- crocoite/behavior.py | 2 +- crocoite/test_behavior.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crocoite') diff --git a/crocoite/behavior.py b/crocoite/behavior.py index 3ecc92f..2d1dd0d 100644 --- a/crocoite/behavior.py +++ b/crocoite/behavior.py @@ -311,7 +311,7 @@ class Click (JsOnload): def __init__ (self, loader, logger): super ().__init__ (loader, logger) with pkg_resources.resource_stream (__name__, os.path.join ('data', 'click.yaml')) as fd: - self.options['sites'] = list (yaml.load_all (fd)) + self.options['sites'] = list (yaml.safe_load_all (fd)) class ExtractLinksEvent: __slots__ = ('links', ) diff --git a/crocoite/test_behavior.py b/crocoite/test_behavior.py index 2c13804..8a0dff4 100644 --- a/crocoite/test_behavior.py +++ b/crocoite/test_behavior.py @@ -32,7 +32,7 @@ from .behavior import Scroll, Behavior, ExtractLinks, ExtractLinksEvent from .controller import SinglePageController, EventHandler with pkg_resources.resource_stream (__name__, os.path.join ('data', 'click.yaml')) as fd: - sites = list (yaml.load_all (fd)) + sites = list (yaml.safe_load_all (fd)) clickParam = [] for o in sites: for s in o['selector']: -- cgit v1.2.3