mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Fixing more v2 issues with integration tests
This commit is contained in:
parent
6f5d18a20e
commit
bbd08cd0e2
7 changed files with 58 additions and 25 deletions
|
@ -66,6 +66,7 @@ class DataLoader():
|
|||
a JSON or YAML string.
|
||||
'''
|
||||
|
||||
#print("in load, data is: %s (%s)" % (data, type(data)))
|
||||
try:
|
||||
# we first try to load this data as JSON
|
||||
return json.loads(data)
|
||||
|
@ -108,6 +109,8 @@ class DataLoader():
|
|||
def _safe_load(self, stream, file_name=None):
|
||||
''' Implements yaml.safe_load(), except using our custom loader class. '''
|
||||
|
||||
#print("stream is: %s" % stream)
|
||||
#print("file name is: %s" % file_name)
|
||||
loader = AnsibleLoader(stream, file_name)
|
||||
try:
|
||||
return loader.get_single_data()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue