From 2647c7de8e52f523948c19e866c1242301a05f3b Mon Sep 17 00:00:00 2001 From: Xuing Date: Fri, 19 Apr 2019 10:59:36 +0800 Subject: [PATCH] Update config.py Fix YAMLLoadWarning --- elastalert/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elastalert/config.py b/elastalert/config.py index af72e5728..b41730108 100644 --- a/elastalert/config.py +++ b/elastalert/config.py @@ -28,7 +28,7 @@ from util import unixms_to_dt # schema for rule yaml -rule_schema = jsonschema.Draft4Validator(yaml.load(open(os.path.join(os.path.dirname(__file__), 'schema.yaml')))) +rule_schema = jsonschema.Draft4Validator(yaml.load(open(os.path.join(os.path.dirname(__file__), 'schema.yaml')), Loader=yaml.FullLoader)) # Required global (config.yaml) and local (rule.yaml) configuration options required_globals = frozenset(['run_every', 'rules_folder', 'es_host', 'es_port', 'writeback_index', 'buffer_time'])