diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2002-04-24 20:44:13 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2002-04-24 20:44:13 +0000 |
commit | 8d5dbe2f70a7975a95ebe391dd9f3cab88fc2969 (patch) | |
tree | 2bf84421f7f0f61bb7403106f1c0f5a2721ea7eb /pyserial/serial | |
parent | a90558afba825af453eee409f82ae5ea5cb8cf3c (diff) | |
download | pyserial-git-8d5dbe2f70a7975a95ebe391dd9f3cab88fc2969.tar.gz |
typo and optimization
Diffstat (limited to 'pyserial/serial')
-rw-r--r-- | pyserial/serial/serialposix.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pyserial/serial/serialposix.py b/pyserial/serial/serialposix.py index b45dd75..5a083de 100644 --- a/pyserial/serial/serialposix.py +++ b/pyserial/serial/serialposix.py @@ -12,7 +12,7 @@ import sys, os, fcntl, termios, struct, string, select import serialutil -VERSION = string.split("$Revision: 1.7 $")[1] #extract CVS version +VERSION = string.split("$Revision: 1.8 $")[1] #extract CVS version PARITY_NONE, PARITY_EVEN, PARITY_ODD = range(3) STOPBITS_ONE, STOPBITS_TWO = (1, 2) @@ -299,7 +299,7 @@ class Serial(serialutil.FileLike): the default is one (unlike files)""" if not self.fd: raise portNotOpenError read = '' - imp = None + inp = None if size > 0: while len(read) < size: if self.timeout: @@ -307,9 +307,7 @@ class Serial(serialutil.FileLike): ready,_,_ = select.select([self.fd],[],[], self.timeout) if not ready: break #timeout - for fd in ready: - if fd is self.fd: - inp = os.read(self.fd, size-len(read)) + inp = os.read(self.fd, size-len(read)) else: inp = os.read(self.fd, size-len(read)) if not inp and self.timeout: break #early abort on timeout |