Skip to content

Commit a2c9e3e

Browse files
authored
Merge pull request #48 from makermelissa/master
Checking if cpu_model is not None
2 parents bf42d08 + 57e3c32 commit a2c9e3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_platformdetect/chip.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ def _linux_id(self): # pylint: disable=too-many-branches
106106
linux_id = S922X
107107

108108
cpu_model = self.detector.get_cpuinfo_field("cpu model")
109-
110-
if "MIPS 24Kc" in cpu_model:
111-
linux_id = MIPS24KC
112-
elif "MIPS 24KEc" in cpu_model:
113-
linux_id = MIPS24KEC
109+
if cpu_model is not None:
110+
if "MIPS 24Kc" in cpu_model:
111+
linux_id = MIPS24KC
112+
elif "MIPS 24KEc" in cpu_model:
113+
linux_id = MIPS24KEC
114114

115115
elif hardware in ("BCM2708", "BCM2709", "BCM2835"):
116116
linux_id = BCM2XXX

0 commit comments

Comments
 (0)