]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Pour corriger le souci d'unicode sur Windows.
authordpt <salome@IS228312.intra.cea.fr>
Wed, 1 Feb 2017 11:00:06 +0000 (12:00 +0100)
committerdpt <salome@IS228312.intra.cea.fr>
Wed, 1 Feb 2017 11:00:06 +0000 (12:00 +0100)
src/pyconf.py

index 1eaea9f74458405834aa82026cf60853de2bb96d..713e3fe3e3e1e19d1a499317f5fcf193f8793eb1 100644 (file)
@@ -1223,6 +1223,10 @@ class ConfigReader(object):
         else:
             self.lastc = None
         self.last_token = tt
+        
+        # Python 2.x specific unicode conversion
+        if sys.version_info[0] == 2 and tt == WORD and isinstance(token, unicode):
+            token = token.encode('ascii')
         return (tt, token)
 
     def load(self, stream, parent=None, suffix=None):