eric6/MicroPython/MicroPythonDevices.py

changeset 8259
2bbec88047dd
parent 8222
5994b80b8760
child 8461
d9fb4a0f2460
diff -r 82b608e352ec -r 2bbec88047dd eric6/MicroPython/MicroPythonDevices.py
--- a/eric6/MicroPython/MicroPythonDevices.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/MicroPython/MicroPythonDevices.py	Wed Apr 21 19:40:50 2021 +0200
@@ -272,11 +272,12 @@
         a pixmap (iconFormat == False)
     @rtype QIcon or QPixmap
     """
-    if boardName in SupportedBoards:
-        iconName = SupportedBoards[boardName]["icon"]
-    else:
+    iconName = (
+        SupportedBoards[boardName]["icon"]
+        if boardName in SupportedBoards else
         # return a generic MicroPython icon
-        iconName = "micropython48"
+        "micropython48"
+    )
     
     if iconFormat:
         return UI.PixmapCache.getIcon(iconName)

eric ide

mercurial