From: Jean-Philippe ARGAUD Date: Fri, 23 Oct 2020 12:27:22 +0000 (+0200) Subject: Issue an error when file name colides with internals X-Git-Tag: V9_6_0rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fremotes%2Forigin%2FV9_6_BR;p=modules%2Fadao.git Issue an error when file name colides with internals --- diff --git a/src/daSalome/daGUI/ADAOGUI.py b/src/daSalome/daGUI/ADAOGUI.py index bc619be..48bb3e2 100644 --- a/src/daSalome/daGUI/ADAOGUI.py +++ b/src/daSalome/daGUI/ADAOGUI.py @@ -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