From: jfa Date: Mon, 3 Apr 2006 10:41:56 +0000 (+0000) Subject: Fix bug 11063: Prevent running salome_test in a study with MED data. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a69713cf140e67fbdecb71b2e6e9371394bedd05;p=modules%2Fkernel.git Fix bug 11063: Prevent running salome_test in a study with MED data. --- diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index 2e203e5aa..ac552d50a 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -17,6 +17,19 @@ import os import SALOME_ModuleCatalog +print "======================================================================" +print " Check, that there is no data of MED component in the Study " +print "======================================================================" + +MedComp = salome.myStudy.FindComponent("MED") +if MedComp is not None: + print "" + print "This script cannot work properly, because there are" + print "some MED component data already exists in the study." + print "Execution aborted." + print "" + raise RuntimeError, "Please, run this script only in a new empty study." + print "======================================================================" print " Get Catalog " print "======================================================================"