diff --git a/pyvisa_py/sessions.py b/pyvisa_py/sessions.py index 6693949..07afbe7 100644 --- a/pyvisa_py/sessions.py +++ b/pyvisa_py/sessions.py @@ -796,10 +796,9 @@ def _read( if current: out.extend(current) end_indicator_received = end_indicator_checker(current) - if end_indicator_received: - if not suppress_end_en: - # RULE 6.1.1 - return bytes(out), StatusCode.success + if end_indicator_received and not suppress_end_en: + # RULE 6.1.1 + return bytes(out), StatusCode.success else: if termination_char_en and (term_char in current): # RULE 6.1.2 diff --git a/pyvisa_py/usb.py b/pyvisa_py/usb.py index 4fc9f64..ad41572 100644 --- a/pyvisa_py/usb.py +++ b/pyvisa_py/usb.py @@ -157,11 +157,6 @@ def _usb_reader(): supress_end_en, _ = self.get_attribute(ResourceAttribute.suppress_end_enabled) - if supress_end_en: - raise ValueError( - "VI_ATTR_SUPPRESS_END_EN == True is currently unsupported by pyvisa-py" - ) - term_char, _ = self.get_attribute(ResourceAttribute.termchar) term_char_en, _ = self.get_attribute(ResourceAttribute.termchar_enabled) @@ -306,6 +301,7 @@ def list_resources() -> List[str]: ) return out + def read(self, count: int) -> Tuple[bytes, StatusCode]: """Reads data from device or interface synchronously.