Skip to content

Commit 09a1fcc

Browse files
committed
change requests!
1 parent 41bf478 commit 09a1fcc

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

adafruit_platformdetect/chip.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ def id(self): # pylint: disable=invalid-name,too-many-branches,too-many-return-s
2828
except KeyError: # no forced chip, continue with testing!
2929
pass
3030

31-
platform = sys.platform
32-
if platform == "linux":
33-
return self._linux_id()
34-
if platform == "esp8266":
35-
return ESP8266
36-
if platform == "samd21":
37-
return SAMD21
38-
if platform == "pyboard":
39-
return STM32
4031
# Special case, if we have an environment var set, we could use FT232H
4132
try:
4233
if os.environ['BLINKA_FT232H']:
@@ -62,6 +53,15 @@ def id(self): # pylint: disable=invalid-name,too-many-branches,too-many-return-s
6253
except KeyError: # no FT232H environment var
6354
pass
6455

56+
platform = sys.platform
57+
if platform == "linux":
58+
return self._linux_id()
59+
if platform == "esp8266":
60+
return ESP8266
61+
if platform == "samd21":
62+
return SAMD21
63+
if platform == "pyboard":
64+
return STM32
6565
# nothing found!
6666
return None
6767
# pylint: enable=invalid-name
@@ -76,7 +76,7 @@ def _linux_id(self):
7676
vendor_id = self.detector.get_cpuinfo_field("vendor_id")
7777
if vendor_id in ("GenuineIntel", "AuthenticAMD"):
7878
linux_id = GENERIC_X86
79-
elif hardware in ("BCM2708", "BCM2708", "BCM2709", "BCM2835"):
79+
elif hardware in ("BCM2708", "BCM2709", "BCM2835"):
8080
linux_id = BCM2XXX
8181
elif "AM33XX" in hardware:
8282
linux_id = AM33XX

0 commit comments

Comments
 (0)