[py3] Use six.text_type instead of unicode in _CWSourceCfgMixIn.update_config() 3.25
authorDenis Laxalde <denis.laxalde@logilab.fr>
Tue, 04 Apr 2017 18:47:13 +0200
branch3.25
changeset 12131 8672535c3b89
parent 12130 4d874c2fbb5f
child 12132 be2c14ea2736
[py3] Use six.text_type instead of unicode in _CWSourceCfgMixIn.update_config()
cubicweb/entities/sources.py
--- a/cubicweb/entities/sources.py	Tue Apr 04 16:06:44 2017 +0200
+++ b/cubicweb/entities/sources.py	Tue Apr 04 18:47:13 2017 +0200
@@ -21,6 +21,8 @@
 from socket import gethostname
 import logging
 
+from six import text_type
+
 from logilab.common.textutils import text_to_dict
 from logilab.common.configuration import OptionError
 from logilab.mtconverter import xml_escape
@@ -48,7 +50,7 @@
                 if skip_unknown:
                     continue
                 raise
-        cfgstr = unicode(generate_source_config(sconfig), self._cw.encoding)
+        cfgstr = text_type(generate_source_config(sconfig), self._cw.encoding)
         self.cw_set(config=cfgstr)