Skip to content

Commit bda43fd

Browse files
committed
sigrokdriver: fix TypeError in stop() by passing bytes to communicate()
Popen is opened without text=True so stdin is in binary mode. communicate(input=...) must receive bytes, not str. Fixes Python 3.11+ TypeError: memoryview requires bytes, not str. Fixes #1847 Signed-off-by: xistadi <xistadi@users.noreply.github.com>
1 parent 3912486 commit bda43fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

labgrid/driver/sigrokdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def stop(self):
175175
csv_filename = f'{os.path.splitext(self._basename)[0]}.csv'
176176

177177
# sigrok-cli can be quit through any keypress
178-
stdout, stderr = self._process.communicate(input="q")
178+
stdout, stderr = self._process.communicate(input=b"q")
179179
self.logger.debug("stdout: %s", stdout)
180180
self.logger.debug("stderr: %s", stderr)
181181

0 commit comments

Comments
 (0)