mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
after initial auth, set self.hkey so full sync works
This commit is contained in:
parent
240f61fd49
commit
452ed53019
1 changed files with 3 additions and 3 deletions
|
@ -197,13 +197,13 @@ class SyncThread(QThread):
|
|||
def _sync(self):
|
||||
if self.auth:
|
||||
# need to authenticate and obtain host key
|
||||
hkey = self.server.hostKey(*self.auth)
|
||||
if not hkey:
|
||||
self.hkey = self.server.hostKey(*self.auth)
|
||||
if not self.hkey:
|
||||
# provided details were invalid
|
||||
return self.fireEvent("badAuth")
|
||||
else:
|
||||
# write new details and tell calling thread to save
|
||||
self.fireEvent("newKey", hkey)
|
||||
self.fireEvent("newKey", self.hkey)
|
||||
# run sync and check state
|
||||
ret = self.client.sync()
|
||||
if ret == "badAuth":
|
||||
|
|
Loading…
Reference in a new issue