Skip to content

Commit

Permalink
spack mirror remove: fix no-update error (spack#6559)
Browse files Browse the repository at this point in the history
Fixes spack#4573 

"spack mirror remove" was not actually removing mirrors from the
configuration.
  • Loading branch information
alalazo authored and scheibelp committed Dec 22, 2017
1 parent f764ac4 commit d391370
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/spack/spack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit d391370

Please sign in to comment.