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 a22a553 commit 40779abCopy full SHA for 40779ab
internal_filesystem/lib/mpos/sdcard.py
@@ -21,15 +21,8 @@ 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
- error_nr = -1
25
- try:
26
- 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
import errno
32
- if error_nr == errno.EPERM: # EPERM is 1, meaning already mounted
+ if e.errno == 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