]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge from V7_2_BR 09/08/2013
authorvsr <vsr@opencascade.com>
Mon, 12 Aug 2013 09:34:06 +0000 (09:34 +0000)
committervsr <vsr@opencascade.com>
Mon, 12 Aug 2013 09:34:06 +0000 (09:34 +0000)
src/GEOM_PY/geomtools.py
src/GEOM_PY/sketcher.py

index 4f9a01044a9583a0ad9efa4a914034fc08392cea..67fb7bdd5d86c402f6ac0905f61bbed7d64ef941 100644 (file)
@@ -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
 
index 7a20387ecd23956f5f1e549e5095dff633905982..cc6404bd85f9b1fd82ffd945e6a8249055d3baf9 100644 (file)
@@ -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: