X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/66bc270495b1773a135b91b432bdf76b096b1aab..5aee9db3978c65382b1c88cd28a1f1af12381fa8:/src/board.py diff --git a/src/board.py b/src/board.py index c2469cc..20d1fd1 100755 --- a/src/board.py +++ b/src/board.py @@ -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))