diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2022-07-22 13:53:13 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-07-26 17:58:01 +1000 |
| commit | e65d1e69e88268145ff0e7e73240f028885915be (patch) | |
| tree | 3e4e19afc776fb319b535f6fdee3d4953bc39924 /extmod/vfs_posix.c | |
| parent | c0fa903d6b2ed5131ae60f8faff2c6ad5276b3a2 (diff) | |
py/modio: Remove FileIO and TextIOWrapper from io module.
On ports with more than one filesystem, the type will be wrong, for example
if using LFS but FAT enabled, then the type will be FAT. So it's not
possible to use these classes to identify a file object type.
Furthermore, constructing an io.FileIO currently crashes on FAT, and
make_new isn't supported on LFS.
And the io.TextIOWrapper class does not match CPython at all.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/vfs_posix.c')
| -rw-r--r-- | extmod/vfs_posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_posix.c b/extmod/vfs_posix.c index 1ada596d1..9b0036581 100644 --- a/extmod/vfs_posix.c +++ b/extmod/vfs_posix.c @@ -138,7 +138,7 @@ STATIC mp_obj_t vfs_posix_open(mp_obj_t self_in, mp_obj_t path_in, mp_obj_t mode if (!mp_obj_is_small_int(path_in)) { path_in = vfs_posix_get_path_obj(self, path_in); } - return mp_vfs_posix_file_open(&mp_type_textio, path_in, mode_in); + return mp_vfs_posix_file_open(&mp_type_vfs_posix_textio, path_in, mode_in); } STATIC MP_DEFINE_CONST_FUN_OBJ_3(vfs_posix_open_obj, vfs_posix_open); |
