summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2015-11-25 18:33:52 -0800
committerPeter Scheibel <scheibel1@llnl.gov>2015-11-25 18:33:52 -0800
commitc5ed7e2a15fe1b0a07cd50bbeee599e09f00a140 (patch)
tree77e0bfad4bf39d1722834e75a4d8fcb2ef89d6dc /bin
parentfc96f62794a5c718afb5904d93bb9370ed4a261d (diff)
downloadspack-c5ed7e2a15fe1b0a07cd50bbeee599e09f00a140.tar.gz
spack-c5ed7e2a15fe1b0a07cd50bbeee599e09f00a140.tar.bz2
spack-c5ed7e2a15fe1b0a07cd50bbeee599e09f00a140.tar.xz
spack-c5ed7e2a15fe1b0a07cd50bbeee599e09f00a140.zip
On systems which have already installed nose (perhaps an older version)
importing nose (which is also in Spack's external/ directory) outputs a warning (since there is more than one nose package). This avoids printing the warning to the user.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/spack b/bin/spack
index e92d7cc273..b4f715ab60 100755
--- a/bin/spack
+++ b/bin/spack
@@ -41,6 +41,14 @@ sys.path.insert(0, SPACK_LIB_PATH)
SPACK_EXTERNAL_LIBS = os.path.join(SPACK_LIB_PATH, "external")
sys.path.insert(0, SPACK_EXTERNAL_LIBS)
+import warnings
+# Avoid warnings when nose is installed with the python exe being used to run
+# spack. Note this must be done after Spack's external libs directory is added
+# to sys.path.
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import nose
+
# Quick and dirty check to clean orphaned .pyc files left over from
# previous revisions. These files were present in earlier versions of
# Spack, were removed, but shadow system modules that Spack still