def convert_resource_format(format): if format: format = format.lower() formats = RESOURCE_MAPPING.keys() if format in formats: format = RESOURCE_MAPPING[format][1] else: format = 'Web Resource' return format
def convert_resource_format(format): if format: format = format.lower() formats = RESOURCE_MAPPING.keys() if format in formats: format = RESOURCE_MAPPING[format][1] else: format = 'Web Page' return format