Commit 96d43466 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

ScanMeta: allow multiple metadata generators (i.e. with different registration...

ScanMeta: allow multiple metadata generators (i.e. with different registration names) to modify the same sub-tree of a metadata category (i.e. merge dictionaries instead of overwrite)
parent faf6f2f7
Pipeline #47506 passed with stages
in 107 minutes and 56 seconds
...@@ -19,6 +19,7 @@ import pprint ...@@ -19,6 +19,7 @@ import pprint
from bliss import global_map from bliss import global_map
from bliss.common.protocols import HasMetadataForScan, HasMetadataForScanExclusive from bliss.common.protocols import HasMetadataForScan, HasMetadataForScanExclusive
from bliss.common.logtools import user_warning from bliss.common.logtools import user_warning
from bliss.common.utils import deep_update
class META_TIMING(enum.Flag): class META_TIMING(enum.Flag):
...@@ -207,7 +208,7 @@ class ScanMeta: ...@@ -207,7 +208,7 @@ class ScanMeta:
if values is None: if values is None:
continue continue
cat_dict = result.setdefault(catname, dict()) cat_dict = result.setdefault(catname, dict())
cat_dict.update(values) deep_update(cat_dict, values)
return result return result
def clear(self): def clear(self):
......
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