def guess_format(string): '''Guess format given an extension or a mime-type''' if string in ACCEPTED_MIME_TYPES: return ACCEPTED_MIME_TYPES[string] return raw_guess_format(string, FORMAT_MAP)
def guess_format(string): '''Guess format given an extension or a mime-type''' if string in ACCEPTED_MIME_TYPES: return ACCEPTED_MIME_TYPES[string] return raw_guess_format(string, FORMAT_MAP)
def guess_format(string): '''Guess format given an extension or a mime-type''' return raw_guess_format(string, FORMAT_MAP)