From 89062ed4c2a68b84e169d2f2b1b446f421cba68d Mon Sep 17 00:00:00 2001 From: Ben Nuttall Date: Wed, 31 Aug 2016 15:04:07 +0100 Subject: [PATCH] Add quotes to dict keys This is a bug introduced in v1.3.0. Currently, hardware SPI is not possible because the NameError is caught on 418 and incorrectly dealt with. The plan is to do a point release v1.3.1 to address this. --- gpiozero/spi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpiozero/spi.py b/gpiozero/spi.py index 7a816fe..431c73e 100644 --- a/gpiozero/spi.py +++ b/gpiozero/spi.py @@ -408,8 +408,8 @@ def SPI(**spi_args): else: try: hardware_spi_args = { - port: 0, - device: {8: 0, 7: 1}[spi_args['select_pin']], + 'port': 0, + 'device': {8: 0, 7: 1}[spi_args['select_pin']], } if shared: return SharedSPIHardwareInterface(**hardware_spi_args)