Skip to content

Commit 31eb319

Browse files
committed
override global info instead of replace on __init__
1 parent 86c0cb0 commit 31eb319

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sigmf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# SPDX-License-Identifier: LGPL-3.0-or-later
66

77
# version of this python module
8-
__version__ = "1.2.4"
8+
__version__ = "1.2.5"
99
# matching version of the SigMF specification
1010
__specification__ = "1.2.0"
1111

sigmf/sigmffile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ def set_metadata(self, metadata):
287287

288288
def set_global_info(self, new_global):
289289
"""
290-
Overwrite the global info with a new dictionary.
290+
Recursively override existing global metadata with new global metadata.
291291
"""
292-
self._metadata[self.GLOBAL_KEY] = new_global.copy()
292+
self._metadata[self.GLOBAL_KEY] = dict_merge(self._metadata[self.GLOBAL_KEY], new_global)
293293

294294
def get_global_info(self):
295295
"""

0 commit comments

Comments
 (0)