Merge "Use yaml.safe_load instead of yaml.load"

This commit is contained in:
Jenkins 2015-10-22 17:31:20 +00:00 committed by Gerrit Code Review
commit 3ee8276baa
2 changed files with 4 additions and 4 deletions
oslo_messaging

@ -61,7 +61,7 @@ class RoutingDriver(notifier.Driver):
return
# Infer which drivers are used from the config file.
self.routing_groups = yaml.load(
self.routing_groups = yaml.safe_load(
self._get_notifier_config_file(filename))
if not self.routing_groups:
self.routing_groups = {} # In case we got None from load()

@ -412,7 +412,7 @@ group_1:
- blah.zoo.*
- zip
"""
groups = yaml.load(config)
groups = yaml.safe_load(config)
group = groups['group_1']
# No matching event ...
@ -443,7 +443,7 @@ group_1:
- info
- error
"""
groups = yaml.load(config)
groups = yaml.safe_load(config)
group = groups['group_1']
# No matching priority
@ -476,7 +476,7 @@ group_1:
accepted_events:
- foo.*
"""
groups = yaml.load(config)
groups = yaml.safe_load(config)
group = groups['group_1']
# Valid event, but no matching priority