Repository navigation
Fix silence_exceptions tuple and comparison against missing update date - #101
Merged
Merged
Conversation
…date Two unrelated latent bugs: * a stray trailing comma made `HttpClient.silence_exceptions` a tuple, always truthy, so `raise_on_error_response = True` never actually surfaced errors; * `get_torrent()` compared `last_updated` against `page_data.date_updated` without checking the latter for `None`, raising `TypeError` for trackers that do not extract a date or fail to parse one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Coverage Report for CI Build 33317791939Coverage increased (+0.02%) to 67.991%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Owner
|
Thank you. Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small, unrelated bugs found while looking at something else.
1.
silence_exceptionsis always truthysrc/torrt/utils.py:The trailing comma makes this a tuple, so
HttpClient(silence_exceptions=False)stores
(False,), which is truthy. As a resultraise_on_error_response = True— set by
tests/trackers/*precisely to make request errors visible — has noeffect, and failures stay swallowed.
Removing the comma restores the intended behaviour. I ran the tracker tests
afterwards to check that unmasking errors does not surface new failures — it
does not; they still pass.
2.
TypeErrorwhen a tracker reports no update datesrc/torrt/base_tracker.py:extract_page_date_updated()returnsNoneby default, and both the kinozal andnnmclub implementations also return
Nonewhen the date cannot be parsed. Once atorrent has a stored
date_updated, the next walk raises:Guarding the comparison keeps the previous behaviour for the no-date case: we do
not skip, we go and fetch.
🤖 Generated with Claude Code