Fixing more v2 issues with integration tests

This commit is contained in:
James Cammarata 2015-01-26 23:41:02 -06:00
commit bbd08cd0e2
7 changed files with 58 additions and 25 deletions

View file

@ -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()