|
@@ -119,8 +119,6 @@ class SerialConnection(BaseConnection):
|
|
|
with self.lock:
|
|
with self.lock:
|
|
|
if self.ser.is_open:
|
|
if self.ser.is_open:
|
|
|
self.ser.close()
|
|
self.ser.close()
|
|
|
- # Release the lock resources
|
|
|
|
|
- self.lock = None
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
###############################################################################
|
|
|
# WebSocket Connection Implementation
|
|
# WebSocket Connection Implementation
|
|
@@ -184,9 +182,7 @@ class WebSocketConnection(BaseConnection):
|
|
|
with self.lock:
|
|
with self.lock:
|
|
|
if self.ws:
|
|
if self.ws:
|
|
|
self.ws.close()
|
|
self.ws.close()
|
|
|
- # Release the lock resources
|
|
|
|
|
- self.lock = None
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
def list_serial_ports():
|
|
def list_serial_ports():
|
|
|
"""Return a list of available serial ports."""
|
|
"""Return a list of available serial ports."""
|
|
|
ports = serial.tools.list_ports.comports()
|
|
ports = serial.tools.list_ports.comports()
|