Timothy Chavez ca481dd206 Use safe_load when parsing yaml
In Openstack I don't think we need to be too concerned with what we're
loading from yaml, but another project might?  So, in the name of
reusability, I propose we use safe_load.  Unless of course this actually
breaks something :)

Change-Id: Ib64f84cba22290a5059e649aee94d65dfa78344f
2015-08-14 17:33:38 -05:00

22 lines
683 B
Python

# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import yaml
class YamlParser(object):
def load(self, path):
return yaml.safe_load(open(path))