Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PosixPollSerial.read fails when timeout=None (the default) #265

Closed
mvgrad98 opened this issue Aug 23, 2017 · 1 comment
Closed

PosixPollSerial.read fails when timeout=None (the default) #265

mvgrad98 opened this issue Aug 23, 2017 · 1 comment

Comments

@mvgrad98
Copy link

If you do not use a timeout (the default) then the conversion to ms from seconds fails:
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

for fd, event in poll.poll(self._timeout * 1000):

Oddly there is already support for _timeout being None following the poll() call but I can't see how we would ever make it there if _timeout was None.

@zsquareplusc
Copy link
Member

i guess that *1000 came in later as the poll function does not take seconds as otherwise usual in Python APIs..

now using the Timeout helper class and i've added support for cancel_read() while at it

diorcety pushed a commit to diorcety/pyserial that referenced this issue Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants