summaryrefslogtreecommitdiff
path: root/tests/extmod/vfs_fat_ramdisk.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-22 19:32:21 +1000
committerDamien George <damien@micropython.org>2021-04-23 22:03:46 +1000
commit3123f6918ba18b0a3f7a89500b450f4cb15e1aee (patch)
tree0916d58b5685fdfcf968004621b7766d3b2046fd /tests/extmod/vfs_fat_ramdisk.py
parent342d55529d6f3312fc158d7af005f56d5e30adef (diff)
tests: Use .errno instead of .args[0] for OSError exceptions.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/vfs_fat_ramdisk.py')
-rw-r--r--tests/extmod/vfs_fat_ramdisk.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py
index 9a68d94fe..4decb5557 100644
--- a/tests/extmod/vfs_fat_ramdisk.py
+++ b/tests/extmod/vfs_fat_ramdisk.py
@@ -57,7 +57,7 @@ print("getcwd:", vfs.getcwd())
try:
vfs.stat("no_file.txt")
except OSError as e:
- print(e.args[0] == uerrno.ENOENT)
+ print(e.errno == uerrno.ENOENT)
with vfs.open("foo_file.txt", "w") as f:
f.write("hello!")
@@ -80,7 +80,7 @@ with vfs.open("sub_file.txt", "w") as f:
try:
vfs.chdir("sub_file.txt")
except OSError as e:
- print(e.args[0] == uerrno.ENOENT)
+ print(e.errno == uerrno.ENOENT)
vfs.chdir("..")
print("getcwd:", vfs.getcwd())
@@ -94,4 +94,4 @@ print(list(vfs.ilistdir(b"")))
try:
vfs.ilistdir(b"no_exist")
except OSError as e:
- print("ENOENT:", e.args[0] == uerrno.ENOENT)
+ print("ENOENT:", e.errno == uerrno.ENOENT)