From c352249e305c00d951586bc8c19a13ceadaa1887 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 14:55:05 +0200 Subject: [PATCH] EnvModules : narrowing the type of exceptions being "handled" --- lib/spack/spack/modules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index aca37ae14b..0d486f6430 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -167,10 +167,11 @@ def write(self): package = self.spec[item].package package.setup_dependent_package(self.pkg.module, self.spec) package.setup_dependent_environment(spack_env, env, self.spec) - except: + except KeyError as e: # The extends was conditional, so it doesn't count here # eg: extends('python', when='+python') - pass + tty.debug(str(e)) + # Package-specific environment modifications self.spec.package.setup_environment(spack_env, env)