Ensure SourceMixin descendents shut down the source prior to closing.
Furthermore, make sure devices are closed before pin factory shuts down,
and that pins have a strong reference to their owning factory (to
prevent losing the factory before the pins).
This commit is contained in:
Dave Jones
2017-06-19 22:22:39 +01:00
parent ab73e857fd
commit bcc94354ea
4 changed files with 25 additions and 4 deletions

View File

@@ -145,6 +145,9 @@ class PinNoPins(PinError, RuntimeError):
class PinInvalidPin(PinError, ValueError):
"Error raised when an invalid pin specification is provided"
class PinReservationsExist(PinError, RuntimeError):
"Error raised when pin factory is changed while reservations still exist"
class GPIOZeroWarning(Warning):
"Base class for all warnings in GPIO Zero"