From 8876e865bc6f60772a6a2b44d0cbf40ccaf9ff3f Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Wed, 7 Apr 2021 19:54:27 +0100 Subject: [PATCH] Fix serial init --- controllers/mattchbox_usb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/mattchbox_usb.py b/controllers/mattchbox_usb.py index 23ac77b..36b6044 100644 --- a/controllers/mattchbox_usb.py +++ b/controllers/mattchbox_usb.py @@ -90,7 +90,7 @@ class MattchBox(Controller): if self.next_port != None: self.connect(self.next_port) - if self.ser.is_open: + if self.ser and self.ser.is_open: self.port = self.next_port # We connected successfully, make it stick. self.server_state.update("ser_connected", True) continue # skip the sleep.