From 1f846c64e0a4eac3a5ae7424fbfe63e69f636685 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 6 Dec 2013 06:20:09 +0000 Subject: [PATCH] Show warning only in the verbose mode. --- src/SMESH_SWIG/smesh.py | 3 ++- src/SMESH_SWIG/smeshBuilder.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py index a764de5b9..99ab3db11 100644 --- a/src/SMESH_SWIG/smesh.py +++ b/src/SMESH_SWIG/smesh.py @@ -59,7 +59,8 @@ for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): try: exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) except Exception, e: - print "Exception while loading %s: %s" % ( pluginBuilderName, e ) + from salome_utils import verbose + if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) continue exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) plugin = eval( pluginBuilderName ) diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index cbf8f5cba..5e68dc230 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -4655,7 +4655,8 @@ for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): try: exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) except Exception, e: - print "Exception while loading %s: %s" % ( pluginBuilderName, e ) + from salome_utils import verbose + if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) continue exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) plugin = eval( pluginBuilderName ) -- 2.39.2