diff -r aa713ac50c0d -r cc717c2ae956 eric6/PluginManager/PluginInstallDialog.py --- a/eric6/PluginManager/PluginInstallDialog.py Thu Apr 15 16:52:05 2021 +0200 +++ b/eric6/PluginManager/PluginInstallDialog.py Thu Apr 15 18:11:24 2021 +0200 @@ -569,7 +569,7 @@ packageDir = os.path.join(destination, packageName) pluginFile = os.path.join(destination, pluginFileName) - try: + with contextlib.suppress(OSError, os.error): if packageDir and os.path.exists(packageDir): shutil.rmtree(packageDir) @@ -596,9 +596,6 @@ os.remove(fnamec) os.remove(pluginFile) - except (OSError, os.error): - # ignore some exceptions - pass class PluginInstallDialog(QDialog):