mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-20 09:40:50 +01:00
Fix: correctly handle non-identifier alias names
Update ExtensionLoader to index aliases by their identifier'd name.
This commit is contained in:
parent
f906cbd851
commit
101d6a37ce
@ -374,9 +374,10 @@ class ExtensionLoader(object):
|
|||||||
store = self._get_store(ext)
|
store = self._get_store(ext)
|
||||||
store[key] = obj
|
store[key] = obj
|
||||||
for alias in obj.aliases:
|
for alias in obj.aliases:
|
||||||
if alias in self.extensions or alias in self.aliases:
|
alias_id = identifier(alias.name)
|
||||||
|
if alias_id in self.extensions or alias_id in self.aliases:
|
||||||
raise LoaderError('{} {} already exists.'.format(ext.name, obj.name))
|
raise LoaderError('{} {} already exists.'.format(ext.name, obj.name))
|
||||||
self.aliases[alias.name] = alias
|
self.aliases[alias_id] = alias
|
||||||
|
|
||||||
# Update global aliases list. If a global alias is already in the list,
|
# Update global aliases list. If a global alias is already in the list,
|
||||||
# then make sure this extension is in the same parent/child hierarchy
|
# then make sure this extension is in the same parent/child hierarchy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user