Skip to content

Commit 7e31fa2

Browse files
cboulayclmcnabb
andauthored
BaseRawIO: fix the has_buffer_description_api() check in get_analogsignal_buffer_description (#1930)
* BaseRawIO: the has_buffer_description_api() check tested the method object, not the result. A reader with a false flag went directly to the private method. For a reader with a method that shouldn't be used (like the Blackrock on PTP files) it returned a wrong description with no errors. An ExampleRawIO reader, whos flag is False, must raise ValueError. * Remove the has_buffer_description_api test --------- Co-authored-by: Colin McNabb <cmcnabb@blackrockneuro.com>
1 parent 442658a commit 7e31fa2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎neo/rawio/baserawio.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ def _rescale_epoch_duration(self, raw_duration: np.ndarray, dtype: np.dtype):
15441544
# buffer api zone
15451545
# must be implemented if has_buffer_description_api=True
15461546
def get_analogsignal_buffer_description(self, block_index: int = 0, seg_index: int = 0, buffer_id: str = None):
1547-
if not self.has_buffer_description_api:
1547+
if not self.has_buffer_description_api():
15481548
raise ValueError("This reader do not support buffer_description API")
15491549
descr = self._get_analogsignal_buffer_description(block_index, seg_index, buffer_id)
15501550
return descr

0 commit comments

Comments
 (0)