commit | acac236b99482037f32790329851f6ab62d78a9b | [log] [tgz] |
---|---|---|
author | Chris Liechti <cliechti@gmx.net> | Tue Mar 29 22:37:48 2016 +0200 |
committer | Chris Liechti <cliechti@gmx.net> | Tue Mar 29 22:37:48 2016 +0200 |
tree | d0d1ab07191969cd7d609823c4fdbfae80e675ab | |
parent | 2ed46acc8e14803c5dfe846a14384b0a85c96019 [diff] [blame] |
refactor: use is_open instead of platform specific attributes, closes #83
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 @@ 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()