Browse Source

gw update: Fix crash when attempting to reopen GW USB devce

Keir Fraser 4 years ago
parent
commit
4570337169
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/greaseweazle/tools/util.py

+ 1 - 1
scripts/greaseweazle/tools/util.py

@@ -65,7 +65,7 @@ def find_port(old_port=None):
         for x in serial.tools.list_ports.comports():
             if x.location and x.location == old_port.location:
                 return x.device
-        return None
+        raise serial.SerialException('Could not reopen Greaseweazle device')
     # Score each serial port
     best_score, best_port = 0, None
     for x in serial.tools.list_ports.comports():