Salome HOME
[PY3] Exception as no longer 'message' attribute
authorGilles DAVID <gilles-g.david@edf.fr>
Tue, 18 Apr 2017 14:29:19 +0000 (16:29 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Tue, 18 Apr 2017 14:29:19 +0000 (16:29 +0200)
src/tests/Test/test_5.py

index 27a0f89f8ba7a2b1a046aa96db854b0b56b7c070..cad22fd5b20564e3a97c166aad4d7839c9f1b2a6 100755 (executable)
@@ -169,7 +169,7 @@ Python script for MED
       meshMEDFile3D.write(ficmed, 2)
     except Exception as eee:
       error = 2
-      raise Exception('ExportToMEDX() failed. '+eee.message)
+      raise Exception('ExportToMEDX() failed. ' + str(eee))
   #
     break
   #
@@ -309,7 +309,7 @@ try :
   if ERROR :
     raise Exception('Pb in mesh_exec')
 except Exception as eee:
-  raise Exception('Pb in mesh_exec: '+eee.message)
+  raise Exception('Pb in mesh_exec: ' + str(eee))
 
 HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
 assert HOMARD is not None, "Impossible to load homard engine"
@@ -322,7 +322,7 @@ try :
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
 except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
+  raise Exception('Pb in homard_exec: ' + str(eee))
 #
 # Test of the results
 #