Pull the numeric class out of an lldpctl class string ('class 4' -> 4).
(class_str)
| 300 | for name in ('speedtest-cli', 'speedtest'): |
| 301 | if _have(name): |
| 302 | return 'cli', name |
| 303 | return None, None |
| 304 | |
| 305 | |
| 306 | def _speedtest_error(res, meta): |
| 307 | """Turn a speedtest client failure into something actionable. 'Cannot |
| 308 | retrieve speedtest configuration / urlopen error timed out' means it could |
| 309 | not reach speedtest.net at all — when we bound the socket to an interface |
| 310 | that is the prime suspect, otherwise it is plain no-internet/blocked.""" |