[mythtv-commits] Ticket #13325: tmdb3 python bindings wait too long for the API rate limit to expire
MythTV
noreply at mythtv.org
Thu Oct 4 07:51:38 UTC 2018
#13325: tmdb3 python bindings wait too long for the API rate limit to expire
-------------------------------+--------------------------------
Reporter: jasongillis | Owner: Raymond Wagner
Type: Patch - Bug Fix | Status: new
Priority: trivial | Milestone: needs_triage
Component: Bindings - Python | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------+--------------------------------
Comment (by ijc):
I'm not a mythtv dev but IMHO it'd be good if some of the verbiage from
above made its way into the commit message (I'm thinking perhaps
everything from "It should be sleeping..." in the first para to the end of
the second paragraph).
Part of me wonders why we don't just wait for whatever the `Retry-After`
header says if it is present, without either the `min` or `max` clamping.
Presumably with a 10s fallback if the header is not present.
Which lead me to wonder if the behaviour here has changed when the header
is missing since `min`/`max` on `(None,10)` do different things (likewise
calling them on `("", 10)`). But actually I suppose/assume that `e.headers
['retry-after']` will raise a key-not-found exception of some sort in that
case so `min`/`max` never gets called and there's no change from this
commit.
So, LGTM modulo the commit message.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13325#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list