diff -r 0835ed67714b -r 2f0d208b8137 eric6/DebugClients/Python/AsyncFile.py --- a/eric6/DebugClients/Python/AsyncFile.py Sat Nov 21 19:31:16 2020 +0100 +++ b/eric6/DebugClients/Python/AsyncFile.py Sun Nov 22 16:04:59 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): """