def _create_filemagic()

in python/magic.py [0:0]


def _create_filemagic(mime_detected, type_detected):
    try:
        mime_type, mime_encoding = mime_detected.split('; ')
    except ValueError:
        raise ValueError(mime_detected)

    return FileMagic(name=type_detected, mime_type=mime_type,
                     encoding=mime_encoding.replace('charset=', ''))