No Description
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 614B

123456789101112131415161718192021
  1. #-*- coding: utf-8 -*-
  2. ## @package lodel.editorial_model.exceptions
  3. # This module contains the specific exceptions related to the EditorialModel Management.
  4. ## @brief Raises an Editorial Model specific exception.
  5. class EditorialModelError(Exception):
  6. pass
  7. ## @brief Tries to import the settings module.
  8. # @raise EditorialModelError
  9. def assert_edit():
  10. try:
  11. from lodel import Settings
  12. except ImportError: # Very dirty, but don't know how to fix the tests
  13. return
  14. if not Settings.editorialmodel.editormode:
  15. raise EditorialModelError("EM is readonly : editormode is OFF")