From: rnv Date: Thu, 20 Jul 2017 09:01:27 +0000 (+0300) Subject: Merge branch 'master' into V9_dev X-Git-Tag: V9_0_0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=469a00178741e5e610d250dc03df29769a532cd3;p=tools%2Fyacsgen.git Merge branch 'master' into V9_dev --- 469a00178741e5e610d250dc03df29769a532cd3 diff --cc module_generator/gener.py index ce80d85,a8f7226..757ebc6 --- a/module_generator/gener.py +++ b/module_generator/gener.py @@@ -809,9 -815,12 +809,12 @@@ ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR} dic key = file name to create dic value = file content or dictionary defining the content of a sub directory """ - for name, content in dic.items(): + for name, content in list(dic.items()): filename = os.path.join(basedir, name) - if isinstance(content, str): + if isinstance(content, basestring): + if isinstance(content, unicode): + # encodage to utf-8 if unicode string + content=content.encode('utf8') fil = open(filename, 'w') fil.write(content) fil.close()