Made sure to use ConfigManager in Syncer

This commit is contained in:
Karsten Lehmann 2020-08-28 00:01:36 +02:00
parent 8358b092a3
commit c97a096e8a
No known key found for this signature in database
GPG Key ID: 6C34E8199743C270

View File

@ -14,6 +14,7 @@ import os
from anki.db import DB, DBError from anki.db import DB, DBError
from anki.utils import ids2str, intTime, platDesc, checksum, devMode from anki.utils import ids2str, intTime, platDesc, checksum, devMode
from anki.consts import * from anki.consts import *
from anki.config import ConfigManager
from anki.utils import versionWithBuild from anki.utils import versionWithBuild
from anki.hooks import runHook from anki.hooks import runHook
import anki import anki
@ -205,7 +206,7 @@ class Syncer(object):
return "model had usn = -1" return "model had usn = -1"
if found: if found:
self.col.models.save() self.col.models.save()
# self.col.sched.reset() self.col.sched.reset()
# check for missing parent decks # check for missing parent decks
#self.col.sched.deckDueList() #self.col.sched.deckDueList()
# return summary of deck # return summary of deck
@ -420,7 +421,10 @@ from notes where %s""" % d)
return self.col.conf return self.col.conf
def mergeConf(self, conf): def mergeConf(self, conf):
self.col.conf = conf newConf = ConfigManager(self.col)
for key, value in conf.items():
newConf[key] = value
self.col.conf = newConf
# Wrapper for requests that tracks upload/download progress # Wrapper for requests that tracks upload/download progress
########################################################################## ##########################################################################