def b16_slug_to_arguments(b16_slug):
    """

        Raises B16DecodingFail exception on
    """
    try:
        url = b16decode(b16_slug.decode('utf-8'))
    except BinaryError:
        raise B16DecodingFail
    except __HOLE__:
        raise B16DecodingFail('Non-base16 digit found')
    except AttributeError:
        raise B16DecodingFail("b16_slug must have a 'decode' method.")

    try:
        app, model, pk = url.decode('utf-8').split('/')[0:3]
    except UnicodeDecodeError:
        raise B16DecodingFail("Invalid b16_slug passed")
    return app, model, pk
dataset/ETHPy150Open pydanny/dj-spam/spam/utils.py/b16_slug_to_arguments