Improve led-tool flashing and settings flow
Made-with: Cursor
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import errno
|
||||
import platform
|
||||
|
||||
try:
|
||||
import platform
|
||||
except Exception: # MicroPython or restricted envs
|
||||
platform = None
|
||||
|
||||
# This table maps numeric values defined by `py/mperrno.h` to host errno code.
|
||||
MP_ERRNO_TABLE = {
|
||||
@@ -51,5 +55,5 @@ MP_ERRNO_TABLE = {
|
||||
115: errno.EINPROGRESS,
|
||||
125: errno.ECANCELED,
|
||||
}
|
||||
if platform.system() != "Windows":
|
||||
if (platform.system() if platform else None) != "Windows":
|
||||
MP_ERRNO_TABLE[15] = errno.ENOTBLK
|
||||
|
||||
Reference in New Issue
Block a user