From a73810b33fdd830de57d873a2339b705f310eb21 Mon Sep 17 00:00:00 2001 From: source Date: Tue, 2 Nov 2021 10:12:35 +0100 Subject: [PATCH] Change .tostring() to .tobytes() for deprecation mitigation --- test/echo.py | 2 +- tuning.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/echo.py b/test/echo.py index b781c19..d51191a 100644 --- a/test/echo.py +++ b/test/echo.py @@ -114,7 +114,7 @@ def run(self): rms_data_db = [] for ch in range(self.channels): mono = data[ch::self.channels] - self.kws_list[ch].put(mono.tostring()) + self.kws_list[ch].put(mono.tobytes()) def main(): diff --git a/tuning.py b/tuning.py index 0272329..3adef75 100755 --- a/tuning.py +++ b/tuning.py @@ -106,7 +106,7 @@ def read(self, name): usb.util.CTRL_IN | usb.util.CTRL_TYPE_VENDOR | usb.util.CTRL_RECIPIENT_DEVICE, 0, cmd, id, length, self.TIMEOUT) - response = struct.unpack(b'ii', response.tostring()) + response = struct.unpack(b'ii', response.tobytes()) if data[2] == 'int': result = response[0]