eric6/PluginManager/PluginInstallDialog.py

changeset 8243
cc717c2ae956
parent 8240
93b8a353c4bf
child 8259
2bbec88047dd
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):

eric ide

mercurial