Yaml safe-loader for Beanstalk contrib processing (#279)

This commit is contained in:
Michael
2021-12-05 17:04:53 -05:00
committed by GitHub
parent 28593b1e0c
commit 659b293b8e

View File

@@ -55,7 +55,7 @@ def init_guard(reconnect=False):
global _Config, _Connection
if _Config is None:
with open('config.yml', 'r') as conffile:
config = yaml.load(conffile)
config = yaml.load(conffile, yaml.SafeLoader)
assert 'beanstalk' in config
assert 'connection' in config['beanstalk']
assert 'host' in config['beanstalk']['connection']