We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6f32b commit dd2371dCopy full SHA for dd2371d
internal_filesystem/lib/mpos/sdcard.py
@@ -21,14 +21,15 @@ def _try_mount(self, mount_point):
21
print(f"SD card mounted successfully at {mount_point}")
22
return True
23
except OSError as e:
24
- errno = -1
+ error_nr = -1
25
try:
26
- errno = e.errno
+ error_nr = e.errno
27
except NameError as we:
28
print("Got this weird (sporadic) \"NameError: name 'errno' isn't defined\" again when parsing OSError: {we}")
29
print(f"Original exception: {e}")
30
print(dir(e))
31
- if errno == errno.EPERM: # EPERM is 1, meaning already mounted
+ import errno
32
+ if error_nr == errno.EPERM: # EPERM is 1, meaning already mounted
33
print(f"Got mount error {e} which means already mounted.")
34
35
else:
0 commit comments