← Commit list

4aa8cc3c4a

Viktor Szakats
Viktor Szakats
2026-06-09
SUCCESS Duration: 242s

Subject

pytest: fix remaining code checker warnings

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/http/test_20_websockets.py+2 -0
@@ -264,6 +264,8 @@ class TestWebsockets:
f = b"\x88\x00" # CLOSE frame
c.sendall(f)
except OSError:
+ # Client may close/reset while we intentionally flood frames.
+ # Send errors are expected here, ignore them.
pass
time.sleep(1)
c.close()
tests/http/testenv/certs.py+1 -2
@@ -484,8 +484,7 @@ class TestCA:
else:
try:
names.append(x509.IPAddress(ipaddress.ip_address(name)))
- # TODO: specify specific exceptions here
- except: # noqa: E722
+ except ValueError:
names.append(x509.DNSName(name))
return csr.add_extension(
tests/http/testenv/curl.py+2 -6
@@ -284,11 +284,10 @@ class ExecResult:
if with_stats:
self._parse_stats()
else:
- # noinspection PyBroadException
try:
out = ''.join(self._stdout)
self._json_out = json.loads(out)
- except: # noqa: E722
+ except (json.JSONDecodeError, TypeError, ValueError):
pass
def __repr__(self):
@@ -300,8 +299,7 @@ class ExecResult:
for line in self._stdout:
try:
self._stats.append(json.loads(line))
- # TODO: specify specific exceptions here
- except: # noqa: E722
+ except (json.JSONDecodeError, TypeError, ValueError):
log.exception(f'not a JSON stat: {line}')
break
@@ -1031,8 +1029,6 @@ class CurlClient:
cwd=self._run_dir, shell=False,
env=self._run_env)
profile = RunProfile(p.pid, started_at, self._run_dir)
- #if intext is not None and False:
- # p.communicate(input=intext.encode(), timeout=1)
if self._with_perf:
perf = PerfProfile(p.pid, self._run_dir)
perf.start()