]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
updated error message for board.py where board_id is None, providing a message that...
authorarhyneRWU <arhyne@rwu.edu>
Tue, 11 May 2021 01:58:48 +0000 (21:58 -0400)
committerarhyneRWU <arhyne@rwu.edu>
Tue, 11 May 2021 01:58:48 +0000 (21:58 -0400)
src/board.py

index c2469cc279439a5bbe9ba046f5d869dbff69ab73..92ed6b92c525efb0735af985580dfd871cfcacc7 100755 (executable)
@@ -227,6 +227,14 @@ elif board_id == ap_board.PICO_U2IF:
 elif "sphinx" in sys.modules:
     pass
 
 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("We could not identify what IoT microcomputer running "
+                              "{0} your Adafruit is attached to, please update the package {1} "
+                              "verison {2} to a newer verison by running: 'pip3 install --upgrade adafruit-blinka adafruit-platformdetect' "
+                              "".format(platform.system(),package[0],package[1]))
 else:
     raise NotImplementedError("Board not supported {}".format(board_id))
 
 else:
     raise NotImplementedError("Board not supported {}".format(board_id))