Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.

Sun, 22 Nov 2020 16:27:23 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 22 Nov 2020 16:27:23 +0100
changeset 49
6b5abf3bc568
parent 48
840f06568486
child 50
481e5fb703c5

Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.

PluginToolGenerateHash.py file | annotate | diff | comparison | revisions
--- a/PluginToolGenerateHash.py	Wed Oct 14 19:32:55 2020 +0200
+++ b/PluginToolGenerateHash.py	Sun Nov 22 16:27:23 2020 +0100
@@ -283,7 +283,7 @@
             try:
                 with open(name, "rb") as f:
                     hashStr = self.Hashes[act.data()](f.read()).hexdigest()
-            except (IOError, OSError) as err:
+            except OSError as err:
                 E5MessageBox.critical(
                     self.__ui,
                     self.tr("Generate File Hash"),
@@ -321,7 +321,7 @@
                             hashStr = self.Hashes[act.data()](
                                 f.read()).hexdigest()
                         hashes.append((name, hashStr))
-                    except (IOError, OSError):
+                    except OSError:
                         fails += 1
             if fails:
                 E5MessageBox.critical(

eric ide

mercurial