diff --git a/serial/rfc2217.py b/serial/rfc2217.py index 12636d46..58fb1cd4 100644 --- a/serial/rfc2217.py +++ b/serial/rfc2217.py @@ -463,7 +463,7 @@ def open(self): self.is_open = True self._thread = threading.Thread(target=self._telnet_read_loop) self._thread.daemon = True - self._thread.setName('pySerial RFC 2217 reader thread for {}'.format(self._port)) + self._thread.name = 'pySerial RFC 2217 reader thread for {}'.format(self._port) self._thread.start() try: # must clean-up if open fails diff --git a/serial/urlhandler/protocol_cp2110.py b/serial/urlhandler/protocol_cp2110.py index ce5b037c..620162f0 100644 --- a/serial/urlhandler/protocol_cp2110.py +++ b/serial/urlhandler/protocol_cp2110.py @@ -100,7 +100,7 @@ def open(self): self.is_open = True self._thread = threading.Thread(target=self._hid_read_loop) self._thread.daemon = True - self._thread.setName('pySerial CP2110 reader thread for {}'.format(self._port)) + self._thread.name = 'pySerial CP2110 reader thread for {}'.format(self._port) self._thread.start() def from_url(self, url):