From: vsr Date: Mon, 12 Aug 2013 09:34:06 +0000 (+0000) Subject: Merge from V7_2_BR 09/08/2013 X-Git-Tag: BR_hydro_v_0_3_1~146 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b87a6c3f3ba90b4b70b967ad08f7bf630118b661;p=modules%2Fgeom.git Merge from V7_2_BR 09/08/2013 --- diff --git a/src/GEOM_PY/geomtools.py b/src/GEOM_PY/geomtools.py index 4f9a01044..67fb7bdd5 100644 --- a/src/GEOM_PY/geomtools.py +++ b/src/GEOM_PY/geomtools.py @@ -32,8 +32,13 @@ logger = Logger("salome.geom.geomtools", color = termcolor.RED) from salome.kernel.studyedit import getActiveStudyId, getStudyEditor from salome.kernel.services import IDToObject, IDToSObject +from salome.kernel.deprecation import is_called_by_sphinx + try: - from salome.gui import helper as guihelper + if not is_called_by_sphinx(): + from salome.gui import helper as guihelper + pass + pass except: pass diff --git a/src/GEOM_PY/sketcher.py b/src/GEOM_PY/sketcher.py index 7a20387ec..cc6404bd8 100644 --- a/src/GEOM_PY/sketcher.py +++ b/src/GEOM_PY/sketcher.py @@ -47,14 +47,18 @@ Additionnal examples can be found as unit tests in the source code. geompyEnable = True try: - import salome - salome.salome_init() - import GEOM - from salome.geom import geomBuilder - geompy = geomBuilder.New(salome.myStudy) + from salome.kernel.deprecation import is_called_by_sphinx + if not is_called_by_sphinx(): + import salome + salome.salome_init() + import GEOM + from salome.geom import geomBuilder + geompy = geomBuilder.New(salome.myStudy) + pass + pass except: geompyEnable = False - + pass class Sketcher: