1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-12-28 11:46:54 +01:00
lodel2_mirror/lodel/editorial_model/exceptions.py
2016-06-29 15:38:36 +02:00

14 lines
344 B
Python

#-*- coding: utf-8 -*-
class EditorialModelError(Exception):
pass
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")