Use the same import mechanisms for auth, storage, rights
This commit is contained in:
@ -24,12 +24,14 @@ configuration.
|
||||
|
||||
"""
|
||||
|
||||
from radicale import config
|
||||
from radicale import config, ical
|
||||
|
||||
|
||||
def load():
|
||||
"""Load list of available storage managers."""
|
||||
storage_type = config.get("storage", "type")
|
||||
module = __import__(
|
||||
root_module = __import__(
|
||||
"storage.%s" % storage_type, globals=globals(), level=2)
|
||||
return getattr(module, storage_type)
|
||||
module = getattr(root_module, storage_type)
|
||||
ical.Collection = module.Collection
|
||||
return module
|
||||
|
@ -112,6 +112,3 @@ class Collection(ical.Collection):
|
||||
self._create_dirs()
|
||||
with open(self._props_path, "w") as prop_file:
|
||||
json.dump(properties, prop_file)
|
||||
|
||||
|
||||
ical.Collection = Collection
|
||||
|
Reference in New Issue
Block a user