mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-30 21:27:17 +00:00
Fix #279
Permit replacement of pin_factory without closing old factory. However, continue closing devices associated with extant pin factory at script termination.
This commit is contained in:
@@ -29,7 +29,7 @@ class SPIDevice(Device):
|
||||
def __init__(self, **spi_args):
|
||||
self._spi = None
|
||||
super(SPIDevice, self).__init__()
|
||||
self._spi = self._pin_factory.spi(**spi_args)
|
||||
self._spi = self.pin_factory.spi(**spi_args)
|
||||
|
||||
def close(self):
|
||||
if self._spi:
|
||||
|
||||
Reference in New Issue
Block a user