Skip to content

Catch only read errors when loading KnowMe data - #14

Open
ranas-mukminov wants to merge 1 commit into
AIPMAndy:mainfrom
ranas-mukminov:fix/knowme-read-errors
Open

ranas-mukminov wants to merge 1 commit into
AIPMAndy:mainfrom
ranas-mukminov:fix/knowme-read-errors

Conversation

@ranas-mukminov

Copy link
Copy Markdown

The KnowMe sync reads its data file with a bare except even though its own error message names the two expected failures, a missing file and invalid data, so any other error is silently reported as a read problem. This narrows the handler to OSError and JSONDecodeError, the two failures the message describes, and lets anything else surface. The edited file passes py_compile; no test suite was run here, so CI is the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant