From dd2371d277e8e63399f67dfc887021ba4b16409e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 23 Nov 2025 20:58:50 +0100 Subject: [PATCH] SDCard: add missing import --- internal_filesystem/lib/mpos/sdcard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal_filesystem/lib/mpos/sdcard.py b/internal_filesystem/lib/mpos/sdcard.py index 3c9cf41f..59d408b9 100644 --- a/internal_filesystem/lib/mpos/sdcard.py +++ b/internal_filesystem/lib/mpos/sdcard.py @@ -21,14 +21,15 @@ class SDCardManager: print(f"SD card mounted successfully at {mount_point}") return True except OSError as e: - errno = -1 + error_nr = -1 try: - errno = e.errno + error_nr = e.errno except NameError as we: print("Got this weird (sporadic) \"NameError: name 'errno' isn't defined\" again when parsing OSError: {we}") print(f"Original exception: {e}") print(dir(e)) - if errno == errno.EPERM: # EPERM is 1, meaning already mounted + import errno + if error_nr == errno.EPERM: # EPERM is 1, meaning already mounted print(f"Got mount error {e} which means already mounted.") return True else: