Don't modify global constants
This commit is contained in:
parent
236eedb555
commit
7096ab74e8
@ -71,7 +71,7 @@ def run():
|
|||||||
continue
|
continue
|
||||||
kwargs = data.copy()
|
kwargs = data.copy()
|
||||||
long_name = "--%s-%s" % (section, option.replace("_", "-"))
|
long_name = "--%s-%s" % (section, option.replace("_", "-"))
|
||||||
args = kwargs.pop("aliases", [])
|
args = list(kwargs.pop("aliases", ()))
|
||||||
args.append(long_name)
|
args.append(long_name)
|
||||||
kwargs["dest"] = "%s_%s" % (section, option)
|
kwargs["dest"] = "%s_%s" % (section, option)
|
||||||
groups[group].append(kwargs["dest"])
|
groups[group].append(kwargs["dest"])
|
||||||
|
@ -105,7 +105,7 @@ DEFAULT_CONFIG_SCHEMA = OrderedDict([
|
|||||||
("hosts", {
|
("hosts", {
|
||||||
"value": "localhost:5232",
|
"value": "localhost:5232",
|
||||||
"help": "set server hostnames including ports",
|
"help": "set server hostnames including ports",
|
||||||
"aliases": ["-H", "--hosts"],
|
"aliases": ("-H", "--hosts",),
|
||||||
"type": list_of_ip_address}),
|
"type": list_of_ip_address}),
|
||||||
("max_connections", {
|
("max_connections", {
|
||||||
"value": "8",
|
"value": "8",
|
||||||
@ -122,23 +122,23 @@ DEFAULT_CONFIG_SCHEMA = OrderedDict([
|
|||||||
("ssl", {
|
("ssl", {
|
||||||
"value": "False",
|
"value": "False",
|
||||||
"help": "use SSL connection",
|
"help": "use SSL connection",
|
||||||
"aliases": ["-s", "--ssl"],
|
"aliases": ("-s", "--ssl",),
|
||||||
"opposite": ["-S", "--no-ssl"],
|
"opposite": ["-S", "--no-ssl"],
|
||||||
"type": bool}),
|
"type": bool}),
|
||||||
("certificate", {
|
("certificate", {
|
||||||
"value": "/etc/ssl/radicale.cert.pem",
|
"value": "/etc/ssl/radicale.cert.pem",
|
||||||
"help": "set certificate file",
|
"help": "set certificate file",
|
||||||
"aliases": ["-c", "--certificate"],
|
"aliases": ("-c", "--certificate",),
|
||||||
"type": filepath}),
|
"type": filepath}),
|
||||||
("key", {
|
("key", {
|
||||||
"value": "/etc/ssl/radicale.key.pem",
|
"value": "/etc/ssl/radicale.key.pem",
|
||||||
"help": "set private key file",
|
"help": "set private key file",
|
||||||
"aliases": ["-k", "--key"],
|
"aliases": ("-k", "--key",),
|
||||||
"type": filepath}),
|
"type": filepath}),
|
||||||
("certificate_authority", {
|
("certificate_authority", {
|
||||||
"value": "",
|
"value": "",
|
||||||
"help": "set CA certificate for validating clients",
|
"help": "set CA certificate for validating clients",
|
||||||
"aliases": ["--certificate-authority"],
|
"aliases": ("--certificate-authority",),
|
||||||
"type": filepath}),
|
"type": filepath}),
|
||||||
("_internal_server", {
|
("_internal_server", {
|
||||||
"value": "False",
|
"value": "False",
|
||||||
|
Loading…
Reference in New Issue
Block a user