diff options
| -rw-r--r-- | ports/rp2/modules/_boot_fat.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ports/rp2/modules/_boot_fat.py b/ports/rp2/modules/_boot_fat.py index 522058445..02d1f99f0 100644 --- a/ports/rp2/modules/_boot_fat.py +++ b/ports/rp2/modules/_boot_fat.py @@ -5,10 +5,9 @@ import machine, rp2 # Try to mount the filesystem, and format the flash if it doesn't exist. bdev = rp2.Flash() try: - fs = vfs.VfsFat(bdev) + vfs.mount(vfs.VfsFat(bdev), "/") except: vfs.VfsFat.mkfs(bdev) - fs = vfs.VfsFat(bdev) -vfs.mount(fs, "/") + vfs.mount(vfs.VfsFat(bdev), "/") -del vfs, bdev, fs +del vfs, bdev |
