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

Sun, 22 Nov 2020 16:28:08 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 22 Nov 2020 16:28:08 +0100
changeset 39
3efaeaf599b6
parent 38
6f0a0b48e80b
child 40
6051c7f094b8

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

PluginWizardDataUriEncoder.py file | annotate | diff | comparison | revisions
WizardDataUriEncoder/DataUriEncoderWizardDialog.py file | annotate | diff | comparison | revisions
--- a/PluginWizardDataUriEncoder.py	Wed Oct 14 19:22:32 2020 +0200
+++ b/PluginWizardDataUriEncoder.py	Sun Nov 22 16:28:08 2020 +0100
@@ -47,18 +47,13 @@
         @param ui reference to the user interface object (UI.UserInterface)
         """
         QObject.__init__(self, ui)
+        
         self.__ui = ui
         self.__action = None
         
         self.__translator = None
         self.__loadTranslator()
     
-    def __initialize(self):
-        """
-        Private slot to (re)initialize the plug-in.
-        """
-        self.__act = None
-    
     def activate(self):
         """
         Public method to activate this plug-in.
--- a/WizardDataUriEncoder/DataUriEncoderWizardDialog.py	Wed Oct 14 19:22:32 2020 +0200
+++ b/WizardDataUriEncoder/DataUriEncoderWizardDialog.py	Sun Nov 22 16:28:08 2020 +0100
@@ -151,7 +151,7 @@
                 else '',
                 base64.b64encode(open(filepath, "rb").read()).decode()
             )
-        except (IOError, OSError) as err:
+        except OSError as err:
             E5MessageBox.critical(
                 self,
                 self.tr("Data URI Encoder"),

eric ide

mercurial