Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/packs/actions/pack_mgmt/get_installed.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ def run(self, pack):

def _parse_yaml_file(self, file_path):
with open(file_path) as data_file:
details = yaml.load(data_file)
details = yaml.safe_load(data_file)
return details
2 changes: 1 addition & 1 deletion st2common/st2common/util/spec_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

def load_spec(module_name, spec_file):
spec_string = generate_spec(module_name, spec_file)
spec = yaml.load(spec_string)
spec = yaml.safe_load(spec_string)
return spec


Expand Down
2 changes: 1 addition & 1 deletion st2common/tests/unit/test_jinja_render_data_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ def test_filter_to_yaml_string(self):

template = '{{k1 | to_yaml_string}}'
obj_yaml_str = env.from_string(template).render({'k1': obj})
actual_obj = yaml.load(obj_yaml_str)
actual_obj = yaml.safe_load(obj_yaml_str)
self.assertDictEqual(obj, actual_obj)
4 changes: 2 additions & 2 deletions st2tests/integration/mistral/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def test_to_yaml_string(self):
ex = self._execute_workflow('examples.mistral-test-func-to-yaml-string', params)
ex = self._wait_for_completion(ex)
self.assertEqual(ex.status, action_constants.LIVEACTION_STATUS_SUCCEEDED)
jinja_dict = yaml.load(ex.result['result_jinja'])
yaql_dict = yaml.load(ex.result['result_yaql'])
jinja_dict = yaml.safe_load(ex.result['result_jinja'])
yaql_dict = yaml.safe_load(ex.result['result_yaql'])
self.assertTrue(isinstance(jinja_dict, dict))
self.assertEqual(jinja_dict['a'], 'b')
self.assertTrue(isinstance(yaql_dict, dict))
Expand Down