summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2017-12-22 19:28:23 +0100
committerscheibelp <scheibel1@llnl.gov>2017-12-22 10:28:23 -0800
commitd3913709bb9c87d728ef537391ff21fb4e25e17f (patch)
treef6e68448ba24c705fd0ce67382bdae12116bff5c
parentf764ac4573e512e9ccec6a6f7b3a0d0bf8c59c1b (diff)
downloadspack-d3913709bb9c87d728ef537391ff21fb4e25e17f.tar.gz
spack-d3913709bb9c87d728ef537391ff21fb4e25e17f.tar.bz2
spack-d3913709bb9c87d728ef537391ff21fb4e25e17f.tar.xz
spack-d3913709bb9c87d728ef537391ff21fb4e25e17f.zip
spack mirror remove: fix no-update error (#6559)
Fixes #4573 "spack mirror remove" was not actually removing mirrors from the configuration.
-rw-r--r--lib/spack/spack/config.py10
1 files changed, 1 insertions, 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)