From: vsr Date: Thu, 7 Apr 2011 05:46:05 +0000 (+0000) Subject: Hide debug messages if verbose mode is not set X-Git-Tag: V6_3_0a1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c34e5513f606e1fad0885a5cda7228ba3d405a32;p=modules%2Fkernel.git Hide debug messages if verbose mode is not set --- diff --git a/src/KERNEL_PY/__init__.py b/src/KERNEL_PY/__init__.py index b04f48dd6..c77234316 100644 --- a/src/KERNEL_PY/__init__.py +++ b/src/KERNEL_PY/__init__.py @@ -24,7 +24,6 @@ # File : salome.py renamed as __init__.py for python packaging (gboulant) # Author : Paul RASCLE, EDF # Module : SALOME -# $Header$ # """ Module salome gives access to Salome ressources. @@ -105,6 +104,7 @@ ROOT_PYTHONPACKAGE_NAME="salome" # be the pieces to be aggregated as a single virtual python package. # import os, sys +from salome_utils import verbose MATCH_ENDING_PATTERN="site-packages/salome" def extend_path(pname): for dir in sys.path: @@ -114,7 +114,7 @@ def extend_path(pname): # XXX This may still add duplicate entries to path on # case-insensitive filesystems if os.path.isdir(subdir) and subdir not in __path__: - print "INFO - The directory %s is appended to sys.path" % subdir + if verbose(): print "INFO - The directory %s is appended to sys.path" % subdir __path__.append(subdir) extend_path(ROOT_PYTHONPACKAGE_NAME)