Load the CollectionWrapper from a factory method
This allows a class implementing CollectionWrapper's interface to be added from config
This commit is contained in:
@@ -388,7 +388,7 @@ class SyncApp:
|
||||
valid_urls = SyncCollectionHandler.operations + SyncMediaHandler.operations + ['hostKey', 'upload', 'download']
|
||||
|
||||
def __init__(self, config):
|
||||
from ankisyncd.thread import getCollectionManager
|
||||
from ankisyncd.thread import get_collection_manager
|
||||
|
||||
self.data_root = os.path.abspath(config['data_root'])
|
||||
self.base_url = config['base_url']
|
||||
@@ -401,7 +401,7 @@ class SyncApp:
|
||||
self.user_manager = get_user_manager(config)
|
||||
self.session_manager = get_session_manager(config)
|
||||
self.full_sync_manager = get_full_sync_manager(config)
|
||||
self.collection_manager = getCollectionManager()
|
||||
self.collection_manager = get_collection_manager(config)
|
||||
|
||||
# make sure the base_url has a trailing slash
|
||||
if not self.base_url.endswith('/'):
|
||||
|
||||
Reference in New Issue
Block a user