summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod_hardware
diff options
context:
space:
mode:
authorAnson Mansfield <amansfield@mantaro.com>2025-04-07 10:08:36 -0400
committerDamien George <damien@micropython.org>2025-04-26 15:50:00 +1000
commit805fe083a3dea76b0acd36ecc436c2b76b808059 (patch)
tree6914c32792a15bf80246aadd888edd9aab72f49e /tests/extmod_hardware
parentcee0419021396a87bd38bb3231b06311f604fad4 (diff)
downloadmicropython-805fe083a3dea76b0acd36ecc436c2b76b808059.tar.gz
micropython-805fe083a3dea76b0acd36ecc436c2b76b808059.zip
tools/mpremote: Refactor error handling to apply generally to any errno.
This rewrites the code that previously manually emitted and caught various OSError subclasses with equivalent code that uses the errno name dictionary to do this generically, and updates the exception handler in do_filesystem to catch them in a similarly-generic fashion using os.strerror to retrieve an appropriate error message text equivalent to the current messages. Note that in the CPython environments where mpremote runs, the call to the OSError constructor already returns an instance of the corresponding mapped exception subtype. Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
Diffstat (limited to 'tests/extmod_hardware')
0 files changed, 0 insertions, 0 deletions