From: Melissa LeBlanc-Williams Date: Sat, 19 Oct 2019 15:31:21 +0000 (-0700) Subject: Merge pull request #166 from lichttag/master X-Git-Tag: 2.6.1~1 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/24371e8c6bd6d3e24ab4bdb2d623d6b6bd6425f8?hp=8e938ca34421a61e7dac40f5674cb401303546ab Merge pull request #166 from lichttag/master Fix missing attribute exception catch for 'SPI.chip' on RPi --- diff --git a/src/adafruit_blinka/microcontroller/generic_linux/spi.py b/src/adafruit_blinka/microcontroller/generic_linux/spi.py index a93c46b..322af93 100755 --- a/src/adafruit_blinka/microcontroller/generic_linux/spi.py +++ b/src/adafruit_blinka/microcontroller/generic_linux/spi.py @@ -35,13 +35,13 @@ class SPI: def set_no_cs(self): # Linux SPI driver for AM33XX chip in BeagleBone and PocketBeagle # does not support setting SPI_NO_CS mode bit (issue #104) - if not self.chip.AM33XX and not self.chip.IMX8MX and not self.chip.SAMA5 \ - and not self.chip.APQ8016 and not self.chip.T210 and not self.chip.T186 \ - and not self.chip.T194 and not self.chip.SUN8I: - try: + try: + if not self.chip.AM33XX and not self.chip.IMX8MX and not self.chip.SAMA5 \ + and not self.chip.APQ8016 and not self.chip.T210 and not self.chip.T186 \ + and not self.chip.T194 and not self.chip.SUN8I: self._spi.no_cs = True # this doesn't work but try anyways - except AttributeError: - pass + except AttributeError: + pass @property def frequency(self):