From 0757c5a68e84a9b90d13984d509c838f309fab35 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Wed, 17 Nov 2021 22:49:30 +0100 Subject: [PATCH] teuthology/beanstalk: workaround yaml load deprecation There is a deprecation error when beanstalk parser called: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe Since beanstalkc3 does not want to apply a fix for that we can override yaml parser to suppress the error message from the log. Fixes: https://tracker.ceph.com/issues/44225 Signed-off-by: Kyr Shatskyy --- teuthology/beanstalk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/beanstalk.py b/teuthology/beanstalk.py index a1165becca..ff3afb6efb 100644 --- a/teuthology/beanstalk.py +++ b/teuthology/beanstalk.py @@ -18,7 +18,7 @@ def connect(): raise RuntimeError( 'Beanstalk queue information not found in {conf_path}'.format( conf_path=config.teuthology_yaml)) - return beanstalkc.Connection(host=host, port=port) + return beanstalkc.Connection(host=host, port=port, parse_yaml=yaml.safe_load) def watch_tube(connection, tube_name): -- 2.39.5