mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
other linter nitpicks (not actually bugs)
This commit is contained in:
parent
f37187a041
commit
760ff2db72
|
@ -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"
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue