Merge "Correct YAML load warning"

This commit is contained in:
Zuul authored and Gerrit Code Review committed 2020-03-18 15:57:14 +00:00
commit 337820e800
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ def export_passwords(swift, stack, excludes=True):
"file from swift: %s", str(e))
sys.exit(1)
data = yaml.load(content)["passwords"]
data = yaml.safe_load(content)["passwords"]
if excludes:
excluded_passwords = []
for k in data:
@@ -59,7 +59,7 @@ class TestFFWDUpgradePrepare(fakes.TestFFWDUpgradePrepare):
@mock.patch('tripleoclient.workflows.package_update.update',
autospec=True)
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
@@ -119,7 +119,7 @@ class TestFFWDUpgradePrepare(fakes.TestFFWDUpgradePrepare):
autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
@@ -46,7 +46,7 @@ class TestOvercloudUpdatePrepare(fakes.TestOvercloudUpdatePrepare):
@mock.patch('tripleoclient.workflows.package_update.update',
autospec=True)
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
@@ -83,7 +83,7 @@ class TestOvercloudUpdatePrepare(fakes.TestOvercloudUpdatePrepare):
autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
@@ -53,7 +53,7 @@ class TestOvercloudUpgradePrepare(fakes.TestOvercloudUpgradePrepare):
@mock.patch('tripleoclient.workflows.package_update.update',
autospec=True)
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
@@ -118,7 +118,7 @@ class TestOvercloudUpgradePrepare(fakes.TestOvercloudUpgradePrepare):
autospec=True)
@mock.patch('six.moves.builtins.open')
@mock.patch('os.path.abspath')
@mock.patch('yaml.load')
@mock.patch('yaml.safe_load')
@mock.patch('shutil.copytree', autospec=True)
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
'_deploy_tripleo_heat_templates', autospec=True)
+1 -1
View File
@@ -2347,7 +2347,7 @@ def check_file_for_enabled_service(env_file):
"""
if os.path.exists(env_file):
with open(env_file, "r") as f:
content = yaml.load(f)
content = yaml.safe_load(f)
deprecated_services_enabled = []
for service in constants.DEPRECATED_SERVICES.keys():
try: