mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-30 06:34:13 +00:00
utils/types: toggle_set: add "~~" semantics
Add support for "~~" special value that indicates that, when merging into another set, all values from that set should in fact be dropped. Apart from the unique merge semantics, "~~" just like any other "~" value.
This commit is contained in:
committed by
Marc Bonnici
parent
9093477f1b
commit
aacba47f9a
@@ -370,6 +370,9 @@ class toggle_set(set):
|
||||
|
||||
@staticmethod
|
||||
def merge(source, dest):
|
||||
if '~~' in dest:
|
||||
dest.remove('~~')
|
||||
return dest
|
||||
for item in source:
|
||||
if item not in dest:
|
||||
#Disable previously enabled item
|
||||
|
||||
Reference in New Issue
Block a user