ntoll / uflash

A module and command to easily flash Python onto the BBC's micro:bit device.
http://micropython.org/
MIT License
101 stars 27 forks source link

Ignore network drives #47

Closed tjguk closed 6 years ago

tjguk commented 6 years ago

Before looking for the characteristic "MICROBIT" drive name, check first that the drive is removable. This avoid delays due to disconnected network drives

tjguk commented 6 years ago

NB I haven't actually checked this code with/without a micro:bit attached. Should get a chance when I'm home, but I assuming that the micro:bit actually does show up as a removable drive!

tjguk commented 6 years ago

This is intended to address https://github.com/mu-editor/mu/issues/393

ntoll commented 6 years ago

This is great @tjguk -- many thanks!

I'll merge once I get the nod from you that it actually works when you get home (after which I'll fix the tox/Python3.3 deprecation errors in Travis). :-)

tjguk commented 6 years ago

I can confirm that the code works as expected and that the micro:bit is correctly discovered as a removable device while other drives (non-existent, local hard disk, cd-rom etc.) are skipped.

ntoll commented 6 years ago

Thank you! Merged and released to PyPI. :-)