# HG changeset patch # User Denis Laxalde # Date 1491391713 -7200 # Node ID 0bf232be21a6e61050fd53b14349005a47aa8db7 # Parent 8743c3bda480585cabd2955475711de7fbc5ce49 [entities] Make CWSource's dictconfig method clearer diff -r 8743c3bda480 -r 0bf232be21a6 cubicweb/entities/sources.py --- a/cubicweb/entities/sources.py Wed Apr 05 08:37:22 2017 +0200 +++ b/cubicweb/entities/sources.py Wed Apr 05 13:28:33 2017 +0200 @@ -31,9 +31,12 @@ class _CWSourceCfgMixIn(object): + @property def dictconfig(self): - return self.config and text_to_dict(self.config) or {} + if not self.config: + return {} + return text_to_dict(self.config) class CWSource(_CWSourceCfgMixIn, AnyEntity):