summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/config.py2
-rw-r--r--lib/spack/spack/modules.py9
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 6ef79c70b1..14e5aaf4fb 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -249,7 +249,7 @@ section_schemas = {
'default': {},
'additionalProperties': False,
'properties': {
- 'disable': {
+ 'enable': {
'type': 'array',
'default': [],
'items': {
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index d354c8bb71..6c32937c3c 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -57,13 +57,8 @@ __all__ = ['EnvModule', 'Dotkit', 'TclModule']
# Registry of all types of modules. Entries created by EnvModule's metaclass
module_types = {}
+CONFIGURATION = spack.config.get_config('modules')
-def read_configuration_file():
- f = spack.config.get_config('modules')
- f.setdefault('disable', []) # Default : disable nothing
- return f
-
-CONFIGURATION = read_configuration_file()
def print_help():
"""For use by commands to tell user how to activate shell support."""
@@ -123,7 +118,7 @@ class EnvModule(object):
class __metaclass__(type):
def __init__(cls, name, bases, dict):
type.__init__(cls, name, bases, dict)
- if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']:
+ if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']:
module_types[cls.name] = cls
def __init__(self, spec=None):