Salome HOME
bos #24412 Add missing failback for UpdateView() method
[modules/kernel.git] / src / KERNEL_PY / salome_study.py
index 57d2d71277c51e136002380b1b8d74556689d5fc..c8fab2542b9bcece546963276dd4be76e91c5c91 100644 (file)
@@ -302,6 +302,14 @@ def salome_study_init_without_session(theStudyPath=None):
         if verbose(): print("Study found")
         pass
 
+    import types
+    if theStudyPath and isinstance(theStudyPath, (str, bytes)):
+        if isinstance(theStudyPath, bytes):
+            theStudyPath = str(theStudyPath, 'UTF8')
+        openStudy(theStudyPath)
+    else:
+        myStudy.Init()
+
     myStudyName = myStudy._get_Name()
 
     return myStudy, myStudyName