1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-28 19:40:54 +00:00

Configuration cleanup.

This commit is contained in:
Guillaume Ayoub 2010-01-16 13:33:50 +01:00
parent 4ee09cf817
commit f1c8497f3b
6 changed files with 37 additions and 25 deletions

View file

@ -24,6 +24,8 @@ Radicale configuration module.
Give a configparser-like interface to read and write configuration.
"""
# TODO: Use abstract filenames for other platforms
try:
from configparser import RawConfigParser as ConfigParser
except ImportError:
@ -40,11 +42,12 @@ items = _config.items
_initial = {
"server": {
"type": "http",
"certificate": "/etc/apache2/ssl/server.crt",
"privatekey": "/etc/apache2/ssl/server.key",
"log": "/var/www/radicale/server.log",
"protocol": "http",
"name": "",
"port": "5232",
#"certificate": "/etc/apache2/ssl/server.crt",
#"privatekey": "/etc/apache2/ssl/server.key",
#"log": "/var/www/radicale/server.log",
},
"encoding": {
"request": "utf-8",
@ -55,14 +58,9 @@ _initial = {
"D": "DAV:",
"CS": "http://calendarserver.org/ns/",
},
"status": {
"200": "HTTP/1.1 200 OK",
"204": "HTTP/1.1 204 No Content",
},
"acl": {
"type": "fake",
"filename": "/etc/radicale/users",
"user": "radicale",
#"filename": "/etc/radicale/users",
},
"support": {
"type": "plain",
@ -76,5 +74,4 @@ for section, values in _initial.items():
for key, value in values.items():
_config.set(section, key, value)
# TODO: Use abstract filename for other platforms
_config.read("/etc/radicale/config")