--- serialposix.py 2014-10-19 18:10:18.890542515 +0200 +++ serialposix-patched.py 2014-10-19 18:13:42.680841412 +0200 @@ -272,7 +272,7 @@ class PosixSerial(SerialBase): - """Serial port class POSIX implementation. Serial port configuration is + """Serial port class POSIX implementation. Serial port configuration is done with termios and fcntl. Runs on Linux and many other Un*x like systems.""" @@ -619,8 +619,8 @@ This will send XON (true) and XOFF (false) to the other device. WARNING: this function is not portable to different platforms! """ - if not self.hComPort: raise portNotOpenError - if enable: + if not self._isOpen: raise portNotOpenError + if level: termios.tcflow(self.fd, TERMIOS.TCION) else: termios.tcflow(self.fd, TERMIOS.TCIOFF) @@ -676,7 +676,7 @@ # handled below buf = os.read(self.fd, size - len(read)) read.extend(buf) - if ((self._timeout is not None and self._timeout >= 0) or + if ((self._timeout is not None and self._timeout >= 0) or (self._interCharTimeout is not None and self._interCharTimeout > 0)) and not buf: break # early abort on timeout return bytes(read)