]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Issue an error when file name colides with internals V9_6_BR origin/V9_6_BR V9_6_0 V9_6_0rc1
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 23 Oct 2020 12:27:22 +0000 (14:27 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 23 Oct 2020 12:27:22 +0000 (14:27 +0200)
src/daSalome/daGUI/ADAOGUI.py

index bc619becb62ff5f2e23c4b7aa1abd557372061d2..48bb3e26fe6c86aa723b54a5b30f68bb17ab1310 100644 (file)
@@ -34,6 +34,12 @@ reasons:
 """
 
 import adao
+if not hasattr(adao, "adao_py_dir"):
+    if hasattr(adao, "__file__"):
+        lieu = " A potential candidate file is %s."%repr(adao.__file__)
+    else:
+        lieu = ""
+    raise ImportError("\n\nFailed to activate module ADAO. Is it perhaps because you own a personnal perturbating file \'adao.py\' somewhere in your PATH?%s Rename, remove or move it before retrying to launch SALOME/ADAO.\n"%lieu)
 from daGuiImpl import ADAOGUI_impl as GuiImpl
 from daUtils import adaoLogger