From c4e96f4a08db18d700aacb5b04b335b0dea79cc1 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 4 Feb 2015 23:16:11 +0100 Subject: [PATCH] Improve error message when model does not have any docstring issue4390 review12921002 --- trytond/model/model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trytond/model/model.py b/trytond/model/model.py index c0967d89f8..3ad1356b2d 100644 --- a/trytond/model/model.py +++ b/trytond/model/model.py @@ -92,6 +92,7 @@ class Model(WarningErrorMixin, URLMixin, PoolBase): ''' Returns the first non-empty line of the model docstring. ''' + assert cls.__doc__, '%s has no docstring' % cls lines = cls.__doc__.splitlines() for line in lines: line = line.strip()