]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #469 from arhyneRWU/master 6.9.1
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Wed, 12 May 2021 15:23:24 +0000 (08:23 -0700)
committerGitHub <noreply@github.com>
Wed, 12 May 2021 15:23:24 +0000 (08:23 -0700)
updated error message for board.py where board_id is None, providing …

src/board.py

index c2469cc279439a5bbe9ba046f5d869dbff69ab73..20d1fd11ea89fd1b710fec87d677969e2ed00d67 100755 (executable)
@@ -227,6 +227,19 @@ elif board_id == ap_board.PICO_U2IF:
 elif "sphinx" in sys.modules:
     pass
 
+elif board_id is None:
+    import platform
+    import pkg_resources
+
+    package = str(pkg_resources.get_distribution("adafruit_platformdetect")).split()
+    raise NotImplementedError(
+        "{1} version {2} was unable to identify the board and/or microcontroller running "
+        "the {0} platform. Please be sure you have the latest packages running: 'pip3 install "
+        "--upgrade adafruit-blinka adafruit-platformdetect'".format(
+            platform.system(), package[0], package[1]
+        )
+    )
+
 else:
     raise NotImplementedError("Board not supported {}".format(board_id))