wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
396 stars 84 forks source link

String handling of Exception doesn't work with LoPy #19

Closed PMunch closed 7 years ago

PMunch commented 7 years ago

I'm trying to use this with a LoPy board but I have some trouble with the ls function. What happens is that the excepted PyboardError for directories doesn't include the word "ENOENT" but is rather the normal "OSError: no such file or directory". This leads to the exception being raised and mpfshell crashing. Changing the check to look for that string works fine but that entire code should be changed for something that actually checks if it is a file or a directory.