Don't modify global constants

This commit is contained in:
Unrud 2020-10-04 05:38:58 +02:00
parent 236eedb555
commit 7096ab74e8
2 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ def run():
continue
kwargs = data.copy()
long_name = "--%s-%s" % (section, option.replace("_", "-"))
args = kwargs.pop("aliases", [])
args = list(kwargs.pop("aliases", ()))
args.append(long_name)
kwargs["dest"] = "%s_%s" % (section, option)
groups[group].append(kwargs["dest"])

View File

@ -105,7 +105,7 @@ DEFAULT_CONFIG_SCHEMA = OrderedDict([
("hosts", {
"value": "localhost:5232",
"help": "set server hostnames including ports",
"aliases": ["-H", "--hosts"],
"aliases": ("-H", "--hosts",),
"type": list_of_ip_address}),
("max_connections", {
"value": "8",
@ -122,23 +122,23 @@ DEFAULT_CONFIG_SCHEMA = OrderedDict([
("ssl", {
"value": "False",
"help": "use SSL connection",
"aliases": ["-s", "--ssl"],
"aliases": ("-s", "--ssl",),
"opposite": ["-S", "--no-ssl"],
"type": bool}),
("certificate", {
"value": "/etc/ssl/radicale.cert.pem",
"help": "set certificate file",
"aliases": ["-c", "--certificate"],
"aliases": ("-c", "--certificate",),
"type": filepath}),
("key", {
"value": "/etc/ssl/radicale.key.pem",
"help": "set private key file",
"aliases": ["-k", "--key"],
"aliases": ("-k", "--key",),
"type": filepath}),
("certificate_authority", {
"value": "",
"help": "set CA certificate for validating clients",
"aliases": ["--certificate-authority"],
"aliases": ("--certificate-authority",),
"type": filepath}),
("_internal_server", {
"value": "False",