Copy configuration before modifying

This commit is contained in:
Unrud 2018-09-04 03:33:36 +02:00
parent df5eb1bfcc
commit 8a817cf402

View File

@ -32,6 +32,7 @@ import socketserver
import ssl
import sys
import wsgiref.simple_server
from configparser import ConfigParser
from urllib.parse import unquote
from radicale import Application
@ -199,6 +200,10 @@ class RequestHandler(wsgiref.simple_server.WSGIRequestHandler):
def serve(configuration):
"""Serve radicale from configuration."""
logger.info("Starting Radicale")
# Copy configuration before modifying
config_copy = ConfigParser()
config_copy.read_dict(configuration)
configuration = config_copy
configuration["internal"]["internal_server"] = "True"
# Create collection servers