eric6/MicroPython/UF2FlashDialog.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8243
cc717c2ae956
diff -r 0572a215bd2f -r 5994b80b8760 eric6/MicroPython/UF2FlashDialog.py
--- a/eric6/MicroPython/UF2FlashDialog.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/MicroPython/UF2FlashDialog.py	Sun Apr 11 18:45:10 2021 +0200
@@ -466,13 +466,15 @@
             continue
         
         for board in SupportedUF2Boards:
-            if not boardType or (board.startswith(boardType)):
-                if (vid, pid) in SupportedUF2Boards[board]["volumes"]:
-                    foundDevices.append((
-                        board,
-                        port.description(),
-                        (vid, pid),
-                    ))
+            if (
+                (not boardType or (board.startswith(boardType))) and
+                (vid, pid) in SupportedUF2Boards[board]["volumes"]
+            ):
+                foundDevices.append((
+                    board,
+                    port.description(),
+                    (vid, pid),
+                ))
     
     # second run for boards needing special treatment (e.g. RP2040)
     for board in SupportedUF2Boards:

eric ide

mercurial