mirror of
https://github.com/9001/copyparty.git
synced 2025-08-16 16:42:13 -06:00
misc cleanup;
* more typos * python 3.13 deprecations
This commit is contained in:
parent
4a4ec88d00
commit
1e7697b551
|
@ -896,7 +896,7 @@ def get_sects():
|
|||
dedent(
|
||||
"""
|
||||
the mDNS protocol is multicast-based, which means there are thousands
|
||||
of fun and intersesting ways for it to break unexpectedly
|
||||
of fun and interesting ways for it to break unexpectedly
|
||||
|
||||
things to check if it does not work at all:
|
||||
|
||||
|
|
|
@ -924,7 +924,7 @@ class AuthSrv(object):
|
|||
|
||||
for un, gn in un_gn:
|
||||
# if ap/vp has a user/group placeholder, make sure to keep
|
||||
# track so the same user/gruop is mapped when setting perms;
|
||||
# track so the same user/group is mapped when setting perms;
|
||||
# otherwise clear un/gn to indicate it's a regular volume
|
||||
|
||||
src1 = src0.replace("${u}", un or "\n")
|
||||
|
|
|
@ -3045,7 +3045,7 @@ class HttpCli(object):
|
|||
if ex.errno != errno.ENOENT:
|
||||
raise
|
||||
|
||||
# if file exists, chekc that timestamp matches the client's
|
||||
# if file exists, check that timestamp matches the client's
|
||||
if srv_lastmod >= 0:
|
||||
same_lastmod = cli_lastmod3 in [-1, srv_lastmod3]
|
||||
if not same_lastmod:
|
||||
|
@ -4789,7 +4789,7 @@ class HttpCli(object):
|
|||
|
||||
fmt = fmt.format(len(nfmt.format(biggest)))
|
||||
retl = [
|
||||
"# {}: {}".format(x, ls[x])
|
||||
("# %s: %s" % (x, ls[x])).replace(r"</span> // <span>", " // ")
|
||||
for x in ["acct", "perms", "srvinf"]
|
||||
if x in ls
|
||||
]
|
||||
|
|
|
@ -473,7 +473,7 @@ class MTag(object):
|
|||
sv = str(zv).split("/")[0].strip().lstrip("0")
|
||||
ret[sk] = sv or 0
|
||||
|
||||
# normalize key notation to rkeobo
|
||||
# normalize key notation to rekobo
|
||||
okey = ret.get("key")
|
||||
if okey:
|
||||
key = str(okey).replace(" ", "").replace("maj", "").replace("min", "m")
|
||||
|
|
|
@ -84,7 +84,7 @@ class SSDPr(object):
|
|||
name = self.args.doctitle
|
||||
zs = zs.strip().format(c(ubase), c(url), c(name), c(self.args.zsid))
|
||||
hc.reply(zs.encode("utf-8", "replace"))
|
||||
return False # close connectino
|
||||
return False # close connection
|
||||
|
||||
|
||||
class SSDPd(MCast):
|
||||
|
|
|
@ -95,7 +95,7 @@ class TcpSrv(object):
|
|||
continue
|
||||
|
||||
# binding 0.0.0.0 after :: fails on dualstack
|
||||
# but is necessary on non-dualstakc
|
||||
# but is necessary on non-dualstack
|
||||
if successful_binds:
|
||||
continue
|
||||
|
||||
|
|
|
@ -1163,7 +1163,7 @@ class Magician(object):
|
|||
return ret
|
||||
|
||||
mime = magic.from_file(fpath, mime=True)
|
||||
mime = re.split("[; ]", mime, 1)[0]
|
||||
mime = re.split("[; ]", mime, maxsplit=1)[0]
|
||||
try:
|
||||
return EXTS[mime]
|
||||
except:
|
||||
|
|
|
@ -279,6 +279,7 @@ the rest is mostly optional; if you need a working env for vscode or similar
|
|||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install jinja2 strip_hints # MANDATORY
|
||||
pip install argon2-cffi # password hashing
|
||||
pip install mutagen # audio metadata
|
||||
pip install pyftpdlib # ftp server
|
||||
pip install partftpy # tftp server
|
||||
|
|
|
@ -71,7 +71,7 @@ def cnv(src):
|
|||
|
||||
def main():
|
||||
src = readclip()
|
||||
src = re.split("0{100,200}", src[::-1], 1)[1][::-1]
|
||||
src = re.split("0{100,200}", src[::-1], maxsplit=1)[1][::-1]
|
||||
with open("helptext.html", "wb") as fo:
|
||||
for ln in cnv(iter(src.split("\n")[:-3])):
|
||||
fo.write(ln.encode("utf-8") + b"\r\n")
|
||||
|
|
Loading…
Reference in a new issue