diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-10-02 23:54:36 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-10-02 23:54:36 +0200 |
commit | e102962247dc3efe7078cad10036608f85562809 (patch) | |
tree | 2ad600ba2be25001852b2b2bb7955c8a209cbd42 | |
parent | bfaf6c8b354beee34010a9be187756c60bfd09f9 (diff) | |
download | pyserial-git-e102962247dc3efe7078cad10036608f85562809.tar.gz |
serialposix: use names instead of numbers (errno)
-rw-r--r-- | serial/serialposix.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py index 78959ce..35eb858 100644 --- a/serial/serialposix.py +++ b/serial/serialposix.py @@ -273,7 +273,8 @@ class Serial(SerialBase, PlatformSpecific): if not self._rtscts: self._update_rts_state() except IOError as e: - if e.errno in (22, 25): # ignore Invalid argument and Inappropriate ioctl + if e.errno in (errno.EINVAL, errno.ENOTTY): + # ignore Invalid argument and Inappropriate ioctl pass else: raise |