You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

exceptions.py 523B

12345678910111213141516171819
  1. class FailedPreCondition(Exception):
  2. def __init__(self, url, message=None, messages=None):
  3. self.url = url
  4. if message:
  5. self.messages = [message]
  6. elif messages:
  7. self.messages = messages
  8. else:
  9. self.messages = []
  10. class PassedSkipCondition(Exception):
  11. """
  12. To be raised when a skip condition has been passed and the current view
  13. should be skipped. The passed URL dictates where to.
  14. """
  15. def __init__(self, url):
  16. self.url = url