diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-03-29 22:37:48 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-03-29 22:37:48 +0200 |
commit | acac236b99482037f32790329851f6ab62d78a9b (patch) | |
tree | d0d1ab07191969cd7d609823c4fdbfae80e675ab /serial/serialposix.py | |
parent | 2ed46acc8e14803c5dfe846a14384b0a85c96019 (diff) | |
download | pyserial-git-acac236b99482037f32790329851f6ab62d78a9b.tar.gz |
refactor: use is_open instead of platform specific attributes, closes #83
Diffstat (limited to 'serial/serialposix.py')
-rw-r--r-- | serial/serialposix.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py index c99dc0e..eff1009 100644 --- a/serial/serialposix.py +++ b/serial/serialposix.py @@ -712,7 +712,7 @@ class PosixPollSerial(Serial): return less characters as requested. With no timeout it will block until the requested number of bytes is read. """ - if self.fd is None: + if not self.is_open: raise portNotOpenError read = bytearray() poll = select.poll() |