def parse_output(output_logical_id, output_json, resources_map): output_json = clean_json(output_json, resources_map) output = Output() output.key = output_logical_id output.value = output_json['Value'] output.description = output_json.get('Description') return output
def parse_output(output_logical_id, output_json, resources_map): try: result = parse_output_orig(output_logical_id, output_json, resources_map) except KeyError: result = Output() result.key = output_logical_id result.value = None result.description = output_json.get('Description') # Make sure output includes export name if not hasattr(result, 'export_name'): result.export_name = output_json.get('Export', {}).get('Name') return result