Catch AttributeError inside GPIODevice._read

Fixes #202
This commit is contained in:
Andrew Scheller
2016-02-18 18:53:52 +00:00
parent 9cc9242f27
commit d970af73fd

View File

@@ -243,7 +243,7 @@ class GPIODevice(ValuesMixin, GPIOBase):
def _read(self):
try:
return self.pin.state == self._active_state
except TypeError:
except (AttributeError, TypeError):
self._check_open()
raise