summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Hegner <hegner@cern.ch>2016-05-10 23:19:30 +0200
committerBenedikt Hegner <hegner@cern.ch>2016-05-10 23:19:30 +0200
commit5d477bc956e0033bd2816d48df1f4096856bc5fe (patch)
treeec3b78e6206941c9954e4fc763bb8c9e114890bc
parent3e717842c94458c1458d6c85ed90fdbffbe06e79 (diff)
downloadspack-5d477bc956e0033bd2816d48df1f4096856bc5fe.tar.gz
spack-5d477bc956e0033bd2816d48df1f4096856bc5fe.tar.bz2
spack-5d477bc956e0033bd2816d48df1f4096856bc5fe.tar.xz
spack-5d477bc956e0033bd2816d48df1f4096856bc5fe.zip
fix setting config for list parameters
-rw-r--r--lib/spack/spack/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 336d47cbb7..06954f535b 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -545,7 +545,10 @@ def update_config(section, update_data, scope=None):
# read in the config to ensure we've got current data
configuration = get_config(section)
- configuration.update(update_data)
+ if isinstance(update_data, list):
+ configuration = update_data
+ else:
+ configuration.extend(update_data)
# read only the requested section's data.
scope.sections[section] = {section: configuration}