From: Melissa LeBlanc-Williams Date: Wed, 12 May 2021 15:23:24 +0000 (-0700) Subject: Merge pull request #469 from arhyneRWU/master X-Git-Tag: 6.9.1 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/commitdiff_plain/963ace91ddaf90947cb5f3f8d221548c57140c14?hp=fc2fe5bb3ae61ca7b2cab559b95870daa2d6d1d9 Merge pull request #469 from arhyneRWU/master updated error message for board.py where board_id is None, providing … --- 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))