Use relative imports for acl and storage modules

This commit is contained in:
Guillaume Ayoub
2012-02-08 16:56:58 +01:00
parent 8dcc613f0a
commit f9d041ba6b
2 changed files with 3 additions and 2 deletions

View File

@ -30,5 +30,6 @@ from radicale import config
def load():
"""Load list of available storage managers."""
storage_type = config.get("storage", "type")
module = __import__("radicale.storage", fromlist=[storage_type])
module = __import__(
"storage.%s" % storage_type, globals=globals(), level=2)
return getattr(module, storage_type)