commit | e102962247dc3efe7078cad10036608f85562809 | [log] [tgz] |
---|---|---|
author | Chris Liechti <cliechti@gmx.net> | Sun Oct 02 23:54:36 2016 +0200 |
committer | Chris Liechti <cliechti@gmx.net> | Sun Oct 02 23:54:36 2016 +0200 |
tree | 2ad600ba2be25001852b2b2bb7955c8a209cbd42 | |
parent | bfaf6c8b354beee34010a9be187756c60bfd09f9 [diff] |
serialposix: use names instead of numbers (errno)
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 @@ 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