Salome HOME
updated copyright message
[modules/shaper.git] / src / PythonAddons / macros / pipeNetwork / feature.py
index a22632084c9882f73ff1a00cda9974d7b37b652a..1ff9ec621ab4697e5eda22fb2f923e759caaf327 100755 (executable)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2016-2020  CEA/DEN, EDF R&D
+# Copyright (C) 2016-2023  CEA, EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -94,8 +94,8 @@ class pipeNetwork(model.Feature):
     def initAttributes(self):
         """Override Feature.initAttributes()"""
         # Creating the input argument of the feature
-        self.data().addAttribute(self.FILE_ID(), ModelAPI.ModelAPI_AttributeString_typeId())
-        #self.data().addAttribute(self.HEXAS_ID(), ModelAPI.ModelAPI_AttributeBoolean_typeId())
+        self.data().addAttribute(self.FILE_ID(), ModelAPI.ModelAPI_AttributeString.typeId())
+        #self.data().addAttribute(self.HEXAS_ID(), ModelAPI.ModelAPI_AttributeBoolean.typeId())
 
 #====================================================================================
 # Retrieve parent pipe
@@ -696,7 +696,7 @@ Il est nommé conformément au noeud d'application. Cela n'a qu'un intérêt gra
             while True:
 
                 # B.1. Lecture du fichier
-                with open(filepath) as afile:
+                with open(filepath, encoding='utf-8') as afile:
                     summary = 0
                     method = self.parligne
                     for line in afile: