1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-02 04:20:55 +01:00
lodel2_mirror/lodel/editorial_model/exceptions.py
2017-03-23 09:32:27 +01:00

21 lines
614 B
Python

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