Commit 34edfae0 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Ensure that data structure returned by query.variables method cannot

mutate canonical version
parent 19571ee6
......@@ -132,10 +132,10 @@ class FileTreeQuery(object):
files of that ``short_name`` type are returned.
"""
if short_name is None:
return dict(self.__allvars)
return {var : list(vals) for var, vals in self.__allvars.items()}
else:
varnames = self.__shortnamevars[short_name]
return {var : self.__allvars[var] for var in varnames}
return {var : list(self.__allvars[var]) for var in varnames}
@property
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment