]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Merge branch 'master' into V9_dev
authorrnv <rnv@opencascade.com>
Thu, 20 Jul 2017 09:01:27 +0000 (12:01 +0300)
committerrnv <rnv@opencascade.com>
Thu, 20 Jul 2017 09:01:27 +0000 (12:01 +0300)
1  2 
module_generator/gener.py
module_generator/mod_tmpl.py

index ce80d856f650b7467dca1a8e566801f824619a7d,a8f722607b136e3c5f46fd7bda480cce120b9445..757ebc6b3fa7b598ff462e1ff7c37988d5ff3544
@@@ -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()
Simple merge