[entities] Make CWSource's dictconfig method clearer 3.25
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 05 Apr 2017 13:28:33 +0200
branch3.25
changeset 12134 0bf232be21a6
parent 12133 8743c3bda480
child 12135 e814ba7e51dc
[entities] Make CWSource's dictconfig method clearer
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):