cubicweb/entities/sources.py
changeset 11767 432f87a63057
parent 11057 0b59724cb3f2
child 11775 39cf9e55ada8
equal deleted inserted replaced
11766:d8de1ac21f36 11767:432f87a63057
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """data source related entities"""
    18 """data source related entities"""
    19 
    19 
    20 __docformat__ = "restructuredtext en"
       
    21 
       
    22 import re
    20 import re
    23 from socket import gethostname
    21 from socket import gethostname
    24 import logging
    22 import logging
    25 
    23 
    26 from logilab.common.textutils import text_to_dict
    24 from logilab.common.textutils import text_to_dict
    27 from logilab.common.configuration import OptionError
    25 from logilab.common.configuration import OptionError
    28 from logilab.mtconverter import xml_escape
    26 from logilab.mtconverter import xml_escape
    29 
    27 
    30 from cubicweb.entities import AnyEntity, fetch_config
    28 from cubicweb.entities import AnyEntity, fetch_config
       
    29 
    31 
    30 
    32 class _CWSourceCfgMixIn(object):
    31 class _CWSourceCfgMixIn(object):
    33     @property
    32     @property
    34     def dictconfig(self):
    33     def dictconfig(self):
    35         return self.config and text_to_dict(self.config) or {}
    34         return self.config and text_to_dict(self.config) or {}