]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/board.py
Merge pull request #437 from tigard-tools/master
[Adafruit_Blinka-hackapet.git] / src / board.py
index 4390b28b3b5e635a73b24b3cb235af1ca8b6e35f..0c8a6455ff962d4badde8034420e90698fa72b6e 100755 (executable)
@@ -230,6 +230,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))