Merge "Use yaml.safe_load instead of load."
This commit is contained in:
commit
0c2662bd06
@ -87,12 +87,14 @@ class OpenStackConfig(object):
|
|||||||
def _load_config_file(self):
|
def _load_config_file(self):
|
||||||
for path in self._config_files:
|
for path in self._config_files:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return yaml.load(open(path, 'r'))
|
with open(path, 'r') as f:
|
||||||
|
return yaml.safe_load(f)
|
||||||
|
|
||||||
def _load_vendor_file(self):
|
def _load_vendor_file(self):
|
||||||
for path in self._vendor_files:
|
for path in self._vendor_files:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return yaml.load(open(path, 'r'))
|
with open(path, 'r') as f:
|
||||||
|
return yaml.safe_load(f)
|
||||||
|
|
||||||
def get_cache_max_age(self):
|
def get_cache_max_age(self):
|
||||||
return self._cache_max_age
|
return self._cache_max_age
|
||||||
|
Loading…
x
Reference in New Issue
Block a user