Skip to content

Commit

Permalink
use proper getters and setters
Browse files Browse the repository at this point in the history
  • Loading branch information
Teque5 committed Sep 10, 2024
1 parent 3c1ba1e commit 4bd0fcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sigmf/sigmffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ def set_metadata(self, metadata):
raise SigMFError("Unable to interpret provided metadata.")

# if num_channels missing, default to 1
if self.NUM_CHANNELS_KEY not in self._metadata[self.GLOBAL_KEY]:
self._metadata[self.GLOBAL_KEY][self.NUM_CHANNELS_KEY] = 1
if self.get_global_field(self.NUM_CHANNELS_KEY) is None:
self.set_global_field(self.NUM_CHANNELS_KEY) = 1

# set specification version to current implemented version
self._metadata[self.GLOBAL_KEY][self.VERSION_KEY] = __specification__
self.set_global_field(self.VERSION_KEY) = __specification__

def set_global_info(self, new_global):
"""
Expand Down

0 comments on commit 4bd0fcf

Please sign in to comment.