mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 04:49:00 +00:00
fw/plugin: return a copy of alias params
When resolving aliases, return a copy of the alias' params to ensure they don't get modified by the calling code.
This commit is contained in:
parent
8c1f636808
commit
775f3d55f2
@ -543,7 +543,7 @@ class PluginLoader(object):
|
|||||||
return (alias_name, {})
|
return (alias_name, {})
|
||||||
if alias_name in self.aliases:
|
if alias_name in self.aliases:
|
||||||
alias = self.aliases[alias_name]
|
alias = self.aliases[alias_name]
|
||||||
return (alias.plugin_name, alias.params)
|
return (alias.plugin_name, copy(alias.params))
|
||||||
raise NotFoundError('Could not find plugin or alias "{}"'.format(alias_name))
|
raise NotFoundError('Could not find plugin or alias "{}"'.format(alias_name))
|
||||||
|
|
||||||
# Internal methods.
|
# Internal methods.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user