[Buildroot] [PATCH v2 2/2] support/scripts/pkg-stats: URL check using threads

Matthew Weber matthew.weber at rockwellcollins.com
Mon Oct 1 14:05:53 UTC 2018


Ricardo,

On Sat, Sep 29, 2018 at 12:42 AM Ricardo Martincoski
<ricardo.martincoski at gmail.com> wrote:
>
> Hello,
>
> On Fri, Sep 21, 2018 at 12:35 PM, Matt Weber wrote:
>
> [snip]
> > +def check_url_status_worker(url, url_status):
> > +    if url_status != "Missing" and url_status != "No Config.in":
> >          try:
> > -            url_status_code = requests.head(pkg.url, timeout=5).status_code
> > +            url_status_code = requests.head(url, timeout=5).status_code
>
> In order to avoid false timeouts for slow hosts, or hosts with a high load, or
> limited internet connection, or slow servers ... I think 30 seconds is a better
> timeout here.

Sure.

>
> >              if url_status_code >= 400:
> > -                pkg.url_status = "Invalid(%s)" % str(url_status_code)
> > +                return "Invalid(%s)" % str(url_status_code)
> >          except requests.exceptions.RequestException as e:
>
> There is a warning from flake8 for this line. Please fix it in previous patch.

I'm not seeing any output from flake8.  To be sure the tool is
working, I changed something syntax wise in the script and I get a
flake8 err/warning.  Are there options you're calling it with?

Matt


More information about the buildroot mailing list