mirror of
https://github.com/9001/copyparty.git
synced 2025-09-28 12:42:26 -06:00
spaces in comma-sep. opts
This commit is contained in:
parent
599e82f24d
commit
d30240b431
|
@ -1974,7 +1974,7 @@ def main(argv: Optional[list[str]] = None) -> None:
|
||||||
if not HAVE_IPV6 and al.i == "::":
|
if not HAVE_IPV6 and al.i == "::":
|
||||||
al.i = "0.0.0.0"
|
al.i = "0.0.0.0"
|
||||||
|
|
||||||
al.i = al.i.split(",")
|
al.i = [x.strip() for x in al.i.split(",")]
|
||||||
try:
|
try:
|
||||||
if "-" in al.p:
|
if "-" in al.p:
|
||||||
lo, hi = [int(x) for x in al.p.split("-")]
|
lo, hi = [int(x) for x in al.p.split("-")]
|
||||||
|
|
|
@ -1659,6 +1659,7 @@ class AuthSrv(object):
|
||||||
# accept both , and : as separators between usernames
|
# accept both , and : as separators between usernames
|
||||||
zs1, zs2 = x.replace("=", ":").split(":", 1)
|
zs1, zs2 = x.replace("=", ":").split(":", 1)
|
||||||
grps[zs1] = zs2.replace(":", ",").split(",")
|
grps[zs1] = zs2.replace(":", ",").split(",")
|
||||||
|
grps[zs1] = [x.strip() for x in grps[zs1]]
|
||||||
except:
|
except:
|
||||||
t = '\n invalid value "{}" for argument --grp, must be groupname:username1,username2,...'
|
t = '\n invalid value "{}" for argument --grp, must be groupname:username1,username2,...'
|
||||||
raise Exception(t.format(x))
|
raise Exception(t.format(x))
|
||||||
|
|
|
@ -130,6 +130,7 @@ def _gen_srv(log: "RootLogger", args, netdevs: dict[str, Netdev]):
|
||||||
nlog: "NamedLogger" = lambda msg, c=0: log("cert-gen-srv", msg, c)
|
nlog: "NamedLogger" = lambda msg, c=0: log("cert-gen-srv", msg, c)
|
||||||
|
|
||||||
names = args.crt_ns.split(",") if args.crt_ns else []
|
names = args.crt_ns.split(",") if args.crt_ns else []
|
||||||
|
names = [x.strip() for x in names]
|
||||||
if not args.crt_exact:
|
if not args.crt_exact:
|
||||||
for n in names[:]:
|
for n in names[:]:
|
||||||
names.append("*.{}".format(n))
|
names.append("*.{}".format(n))
|
||||||
|
|
|
@ -25,6 +25,7 @@ class PWHash(object):
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
||||||
zsl = args.ah_alg.split(",")
|
zsl = args.ah_alg.split(",")
|
||||||
|
zsl = [x.strip() for x in zsl]
|
||||||
alg = zsl[0]
|
alg = zsl[0]
|
||||||
if alg == "none":
|
if alg == "none":
|
||||||
alg = ""
|
alg = ""
|
||||||
|
|
|
@ -325,7 +325,7 @@ class SvcHub(object):
|
||||||
|
|
||||||
self._feature_test()
|
self._feature_test()
|
||||||
|
|
||||||
decs = {k: 1 for k in self.args.th_dec.split(",")}
|
decs = {k.strip(): 1 for k in self.args.th_dec.split(",")}
|
||||||
if not HAVE_VIPS:
|
if not HAVE_VIPS:
|
||||||
decs.pop("vips", None)
|
decs.pop("vips", None)
|
||||||
if not HAVE_PIL:
|
if not HAVE_PIL:
|
||||||
|
@ -1095,7 +1095,7 @@ class SvcHub(object):
|
||||||
al.tcolor = "".join([x * 2 for x in al.tcolor])
|
al.tcolor = "".join([x * 2 for x in al.tcolor])
|
||||||
|
|
||||||
zs = al.u2sz
|
zs = al.u2sz
|
||||||
zsl = zs.split(",")
|
zsl = [x.strip() for x in zs.split(",")]
|
||||||
if len(zsl) not in (1, 3):
|
if len(zsl) not in (1, 3):
|
||||||
t = "invalid --u2sz; must be either one number, or a comma-separated list of three numbers (min,default,max)"
|
t = "invalid --u2sz; must be either one number, or a comma-separated list of three numbers (min,default,max)"
|
||||||
raise Exception(t)
|
raise Exception(t)
|
||||||
|
|
Loading…
Reference in a new issue