From 59dff388110508ffef2469a78722459b7c59a2dd Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Tue, 31 Aug 2021 21:21:21 +0100 Subject: [PATCH] k9, p8, pinetime: Fix initial filesystem creation Signed-off-by: Daniel Thompson --- wasp/boards/k9/watch.py.in | 2 +- wasp/boards/p8/watch.py.in | 2 +- wasp/boards/pinetime/watch.py.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wasp/boards/k9/watch.py.in b/wasp/boards/k9/watch.py.in index 8360451..6748279 100644 --- a/wasp/boards/k9/watch.py.in +++ b/wasp/boards/k9/watch.py.in @@ -113,7 +113,7 @@ try: try: boot_msg("Mount FS") os.mount(flash, '/flash') - except AttributeError: + except (AttributeError, OSError) as e: # Format the filesystem (and provide a default version of main.py) boot_msg("Format FS") os.VfsLfs2.mkfs(flash) diff --git a/wasp/boards/p8/watch.py.in b/wasp/boards/p8/watch.py.in index e133fee..1993a58 100644 --- a/wasp/boards/p8/watch.py.in +++ b/wasp/boards/p8/watch.py.in @@ -101,7 +101,7 @@ try: try: boot_msg("Mount FS") os.mount(flash, '/flash') - except AttributeError: + except (AttributeError, OSError) as e: # Format the filesystem (and provide a default version of main.py) boot_msg("Format FS") os.VfsLfs2.mkfs(flash) diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in index 6db9537..91c59c3 100644 --- a/wasp/boards/pinetime/watch.py.in +++ b/wasp/boards/pinetime/watch.py.in @@ -103,7 +103,7 @@ try: try: boot_msg("Mount FS") os.mount(flash, '/flash') - except AttributeError: + except (AttributeError, OSError) as e: # Format the filesystem (and provide a default version of main.py) boot_msg("Format FS") os.VfsLfs2.mkfs(flash)