Files
edx-platform/openedx/core/djangoapps/embargo/exceptions.py
M. Zulqarnain 39b207007c BOM-2323 : Pylint amnesty in embargo and enrollments apps (#26368)
* pylint amnesty in openedx apps
2021-02-04 15:32:59 +05:00

12 lines
465 B
Python

"""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) # lint-amnesty, pylint: disable=super-with-arguments