Prevent/handle TypeError in `Tahoe.ls` by crwood · Pull Request #464 · gridsync/gridsync

Conversation

@crwood

This PR handles the TypeError that would previously raise (and go uncaught) when Tahoe.ls was unable to read JSON from the Tahoe-LAFS web API (for example, due to connection problems). With these changes, Tahoe.ls will return a None type in such situations that can be handled (more) appropriately by higher-level callers: in the case of attempting (and failing) to list/compare magic-folder backups during a periodic MagicFolderMonitor check, a warning will be logged; in the case of attempting (and failing) to restore a magic-folder backup that cannot be read, a slightly more friendly error message will be propagated to the user.

@crwood crwood deleted the 462.tahoe-ls-type-error branch

March 1, 2022 03:36

1 participant

@crwood