Commit 48f5ffaf authored by J. Fernando Sánchez's avatar J. Fernando Sánchez

Defer plugin validation to init

parent 73f7cbbe
...@@ -49,11 +49,11 @@ class PluginMeta(models.BaseMeta): ...@@ -49,11 +49,11 @@ class PluginMeta(models.BaseMeta):
attrs['name'] = alias attrs['name'] = alias
if 'description' not in attrs: if 'description' not in attrs:
doc = attrs.get('__doc__', None) doc = attrs.get('__doc__', None)
if not doc: if doc:
raise Exception(('Please, add a description or ' attrs['description'] = doc
'documentation to class {}').format(name)) else:
attrs['description'] = doc logger.warn(('Plugin {} does not have a description. '
attrs['name'] = alias 'Please, add a short summary to help other developers').format(name))
cls = super(PluginMeta, mcs).__new__(mcs, name, bases, attrs) cls = super(PluginMeta, mcs).__new__(mcs, name, bases, attrs)
if alias in mcs._classes: if alias in mcs._classes:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment