eric6/DebugClients/Python/AsyncFile.py

branch
multi_processing
changeset 7853
35dcac32984a
parent 7802
eefe954f01e8
parent 7836
2f0d208b8137
child 7923
91e843545d9a
--- a/eric6/DebugClients/Python/AsyncFile.py	Sat Oct 31 12:19:44 2020 +0100
+++ b/eric6/DebugClients/Python/AsyncFile.py	Sat Dec 05 18:02:17 2020 +0100
@@ -65,14 +65,14 @@
         Private method to check the mode.
         
         This method checks, if an operation is permitted according to
-        the mode of the file. If it is not, an IOError is raised.
+        the mode of the file. If it is not, an OSError is raised.
         
         @param mode the mode to be checked
         @type string
-        @exception IOError raised to indicate a bad file descriptor
+        @exception OSError raised to indicate a bad file descriptor
         """
         if mode != self.mode:
-            raise IOError((9, '[Errno 9] Bad file descriptor'))
+            raise OSError((9, '[Errno 9] Bad file descriptor'))
 
     def pendingWrite(self):
         """
@@ -112,7 +112,7 @@
                     pass
                 self.sock.sendall(buf)
                 self.nWriteErrors = 0
-            except socket.error:
+            except OSError:
                 self.nWriteErrors += 1
                 if self.nWriteErrors > self.maxtries:
                     self.wpending = []    # delete all output
@@ -135,7 +135,7 @@
         """
         try:
             return self.sock.fileno()
-        except socket.error:
+        except OSError:
             return -1
 
     def readable(self):
@@ -294,19 +294,19 @@
         @type int
         @param whence position the offset relates to
         @type int
-        @exception IOError This method is not supported and always raises an
-        IOError.
+        @exception OSError This method is not supported and always raises an
+        OSError.
         """
-        raise IOError((29, '[Errno 29] Illegal seek'))
+        raise OSError((29, '[Errno 29] Illegal seek'))
 
     def tell(self):
         """
         Public method to get the filepointer position.
         
-        @exception IOError This method is not supported and always raises an
-        IOError.
+        @exception OSError This method is not supported and always raises an
+        OSError.
         """
-        raise IOError((29, '[Errno 29] Illegal seek'))
+        raise OSError((29, '[Errno 29] Illegal seek'))
 
     def truncate(self, size=-1):
         """
@@ -314,10 +314,10 @@
         
         @param size size to truncate to
         @type int
-        @exception IOError This method is not supported and always raises an
-        IOError.
+        @exception OSError This method is not supported and always raises an
+        OSError.
         """
-        raise IOError((29, '[Errno 29] Illegal seek'))
+        raise OSError((29, '[Errno 29] Illegal seek'))
 
     def writable(self):
         """

eric ide

mercurial