From d3913709bb9c87d728ef537391ff21fb4e25e17f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 22 Dec 2017 19:28:23 +0100 Subject: spack mirror remove: fix no-update error (#6559) Fixes #4573 "spack mirror remove" was not actually removing mirrors from the configuration. --- lib/spack/spack/config.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 7bbf9da7d8..3a34db13e0 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -445,16 +445,8 @@ def update_config(section, update_data, scope=None): validate_section_name(section) # validate section name scope = validate_scope(scope) # get ConfigScope object from string. - # read in the config to ensure we've got current data - configuration = get_config(section) - - if isinstance(update_data, list): - configuration = update_data - else: - configuration.update(update_data) - # read only the requested section's data. - scope.sections[section] = {section: configuration} + scope.sections[section] = {section: update_data} scope.write_section(section) -- cgit v1.2.3-70-g09d2