Skip to content

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Apr 3, 2018

This should fix #319.

@theotherjimmy I've wrapped the whole block in a try/except since each function can access the device files. Let me know if you want to go about it a different way. I also modified list_mbeds a bit so devices that unmount mid-read are treated like unmounted devices.

cc @jupe

bridadan added 3 commits April 3, 2018 14:04
Devices that raise an OSError while information is being read from
their filesystem are reported in similar way to unmounted devices. This
patch makes sure the behavior of list_mbeds adheres to these
assumptions. It also introduces tests for these cases.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 77.935% when pulling bd48498 on bridadan:fix_unmounted_traceback into 1146d8c on ARMmbed:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 77.935% when pulling bd48498 on bridadan:fix_unmounted_traceback into 1146d8c on ARMmbed:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 77.935% when pulling bd48498 on bridadan:fix_unmounted_traceback into 1146d8c on ARMmbed:master.

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good tests!

@theotherjimmy theotherjimmy merged commit a631417 into ARMmbed:master Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list_mbeds() raises WindowsError [Error 21] The device is not ready: 'H:*.*'
3 participants