exceptions.py 411 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
"""Exceptions for the embargo app."""


class InvalidAccessPoint(Exception):
    """The requested access point is not supported. """

    def __init__(self, access_point, *args, **kwargs):
        msg = (
            u"Access point '{access_point}' should be either 'enrollment' or 'courseware'"
        ).format(access_point=access_point)
        super(InvalidAccessPoint, self).__init__(msg, *args, **kwargs)