--- a/eric6/UI/BrowserModel.py Thu Apr 15 16:52:05 2021 +0200 +++ b/eric6/UI/BrowserModel.py Thu Apr 15 18:11:24 2021 +0200 @@ -10,6 +10,7 @@ import os import fnmatch import json +import contextlib from PyQt5.QtCore import ( QDir, QModelIndex, QAbstractItemModel, QFileSystemWatcher, Qt, QProcess, @@ -648,12 +649,10 @@ # special treatment done later continue cl = dictionary[key] - try: + with contextlib.suppress(AttributeError): if cl.module == moduleName: node = BrowserClassItem(parentItem, cl, fileName) self._addItem(node, parentItem) - except AttributeError: - pass if "@@Coding@@" in keys and Preferences.getUI("BrowserShowCoding"): node = BrowserCodingItem( parentItem,