From the round-1 review of #212.
Where: scripts/fleet/check_cards.py read_source().
The fetch catches HTTPError, URLError, TimeoutError and OSError. Two errors get past all of them, because they subclass http.client.HTTPException instead:
http.client.IncompleteRead, raised when the connection drops mid-body;
http.client.BadStatusLine.
main() prints only after check() returns. So one such error on any source loses the whole report: no rows, no summary, just a traceback and exit 1.
Evidence: against a local server, a truncated body raised "IncompleteRead(45 bytes read, 500 more expected)" out of main(), and none of the other three rows was printed. This predates #212, but #212's docstring says a fetch that did not arrive is a warning.
Fix: catch http.client.HTTPException as unread.
From the round-1 review of #212.
Where:
scripts/fleet/check_cards.pyread_source().The fetch catches HTTPError, URLError, TimeoutError and OSError. Two errors get past all of them, because they subclass
http.client.HTTPExceptioninstead:http.client.IncompleteRead, raised when the connection drops mid-body;http.client.BadStatusLine.main()prints only aftercheck()returns. So one such error on any source loses the whole report: no rows, no summary, just a traceback and exit 1.Evidence: against a local server, a truncated body raised "IncompleteRead(45 bytes read, 500 more expected)" out of
main(), and none of the other three rows was printed. This predates #212, but #212's docstring says a fetch that did not arrive is a warning.Fix: catch
http.client.HTTPExceptionas unread.