Use relative imports for acl and storage modules
This commit is contained in:
parent
8dcc613f0a
commit
f9d041ba6b
@ -53,5 +53,5 @@ def load():
|
|||||||
else:
|
else:
|
||||||
PUBLIC_USERS.extend(_config_users("public_users"))
|
PUBLIC_USERS.extend(_config_users("public_users"))
|
||||||
PRIVATE_USERS.extend(_config_users("private_users"))
|
PRIVATE_USERS.extend(_config_users("private_users"))
|
||||||
module = __import__("radicale.acl", fromlist=[acl_type])
|
module = __import__("acl.%s" % acl_type, globals=globals(), level=2)
|
||||||
return getattr(module, acl_type)
|
return getattr(module, acl_type)
|
||||||
|
@ -30,5 +30,6 @@ from radicale import config
|
|||||||
def load():
|
def load():
|
||||||
"""Load list of available storage managers."""
|
"""Load list of available storage managers."""
|
||||||
storage_type = config.get("storage", "type")
|
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)
|
return getattr(module, storage_type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user