From 967b6a463d8872ab80ffa58edee1edebe5feffe0 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 12 Jan 2020 23:32:27 +0100 Subject: [PATCH] Remove unnecessary optimizations --- radicale/config.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/radicale/config.py b/radicale/config.py index e4623f6..c187dac 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -386,9 +386,7 @@ class Configuration: """ if plugin_schema is None: schema = self._schema - skip = 1 # skip default config else: - skip = 0 schema = self._schema.copy() for section, options in plugin_schema.items(): if (section not in schema or "type" not in schema[section] or @@ -403,9 +401,9 @@ class Configuration: raise ValueError("option already exists in %r: %r" % ( section, option)) schema[section][option] = value - copy = self.__class__(schema) - for config, source, allow_internal in self._configs[skip:]: - copy.update(config, source, allow_internal) + copy = type(self)(schema) + for config, source, internal in self._configs: + copy.update(config, source, internal) return copy def log_config_sources(self):