From d0be5447fa77c83cdb535e229029eb6c50f444bb Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Wed, 5 Mar 2025 09:55:13 +0100 Subject: [PATCH] Catch KeyErrorsg --- favro_sync/favro_fuse.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/favro_sync/favro_fuse.py b/favro_sync/favro_fuse.py index 9bf4205..e37b132 100644 --- a/favro_sync/favro_fuse.py +++ b/favro_sync/favro_fuse.py @@ -297,7 +297,10 @@ class FavroFuse(fuse.Fuse): card_updated = self.formatter.parse_card_contents(contents_str) self.favro_client.update_card_contents(card.card_id, card_updated) - self.wiped_cards.remove(file_system_item.seq_id) + try: + self.wiped_cards.remove(file_system_item.seq_id) + except KeyError: + pass # Return amount written return len(written_buffer)