other linter nitpicks (not actually bugs)

This commit is contained in:
ed 2024-07-13 01:18:14 +02:00
parent f37187a041
commit 760ff2db72
4 changed files with 7 additions and 3 deletions

View file

@ -748,7 +748,7 @@ class HttpCli(object):
or ("; Trident/" in self.ua and not k304) or ("; Trident/" in self.ua and not k304)
) )
def _build_html_head(self, maybe_html: Any, kv: dict[str, Any]) -> bool: def _build_html_head(self, maybe_html: Any, kv: dict[str, Any]) -> None:
html = str(maybe_html) html = str(maybe_html)
is_jinja = html[:2] in "%@%" is_jinja = html[:2] in "%@%"
if is_jinja: if is_jinja:
@ -3075,6 +3075,7 @@ class HttpCli(object):
logtail = "" logtail = ""
if ptop is not None: if ptop is not None:
ap_data = "<%s>" % (req_path,)
try: try:
dp, fn = os.path.split(req_path) dp, fn = os.path.split(req_path)
tnam = fn + ".PARTIAL" tnam = fn + ".PARTIAL"

View file

@ -361,7 +361,7 @@ class MDNS(MCast):
except: except:
pass pass
self.srv = {} self.srv.clear()
def eat(self, buf: bytes, addr: tuple[str, int], sck: socket.socket) -> None: def eat(self, buf: bytes, addr: tuple[str, int], sck: socket.socket) -> None:
cip = addr[0] cip = addr[0]

View file

@ -139,6 +139,9 @@ def au_unpk(
zil = [x for x in zil if x.filename.lower().split(".")[-1] == au] zil = [x for x in zil if x.filename.lower().split(".")[-1] == au]
fi = zf.open(zil[0]) fi = zf.open(zil[0])
else:
raise Exception("unknown compression %s" % (pk,))
with os.fdopen(fd, "wb") as fo: with os.fdopen(fd, "wb") as fo:
while True: while True:
buf = fi.read(32768) buf = fi.read(32768)

View file

@ -188,7 +188,7 @@ class SSDPd(MCast):
except: except:
pass pass
self.srv = {} self.srv.clear()
def eat(self, buf: bytes, addr: tuple[str, int]) -> None: def eat(self, buf: bytes, addr: tuple[str, int]) -> None:
cip = addr[0] cip = addr[0]