Merge pull request #1906 from jberry-suse/yaml-safe-load
Replace deprecated (and not advised) yaml.load() with yaml.safe_load().
This commit is contained in:
commit
a13930afd4
@ -698,7 +698,7 @@ class StagingAPI(object):
|
|||||||
|
|
||||||
def load_prj_pseudometa(self, description_text):
|
def load_prj_pseudometa(self, description_text):
|
||||||
try:
|
try:
|
||||||
data = yaml.load(description_text)
|
data = yaml.safe_load(description_text)
|
||||||
if isinstance(data, str) or data is None:
|
if isinstance(data, str) or data is None:
|
||||||
data = {}
|
data = {}
|
||||||
except (TypeError, AttributeError):
|
except (TypeError, AttributeError):
|
||||||
|
@ -94,7 +94,7 @@ class ToTestBase(object):
|
|||||||
def load_issues_to_ignore(self):
|
def load_issues_to_ignore(self):
|
||||||
text = self.api.attribute_value_load('IgnoredIssues')
|
text = self.api.attribute_value_load('IgnoredIssues')
|
||||||
if text:
|
if text:
|
||||||
root = yaml.load(text)
|
root = yaml.safe_load(text)
|
||||||
self.issues_to_ignore = root.get('last_seen')
|
self.issues_to_ignore = root.get('last_seen')
|
||||||
else:
|
else:
|
||||||
self.issues_to_ignore = dict()
|
self.issues_to_ignore = dict()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user