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)