mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -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):
|
def _sync(self):
|
||||||
if self.auth:
|
if self.auth:
|
||||||
# need to authenticate and obtain host key
|
# need to authenticate and obtain host key
|
||||||
hkey = self.server.hostKey(*self.auth)
|
self.hkey = self.server.hostKey(*self.auth)
|
||||||
if not hkey:
|
if not self.hkey:
|
||||||
# provided details were invalid
|
# provided details were invalid
|
||||||
return self.fireEvent("badAuth")
|
return self.fireEvent("badAuth")
|
||||||
else:
|
else:
|
||||||
# write new details and tell calling thread to save
|
# write new details and tell calling thread to save
|
||||||
self.fireEvent("newKey", hkey)
|
self.fireEvent("newKey", self.hkey)
|
||||||
# run sync and check state
|
# run sync and check state
|
||||||
ret = self.client.sync()
|
ret = self.client.sync()
|
||||||
if ret == "badAuth":
|
if ret == "badAuth":
|
||||||
|
|
Loading…
Reference in a new issue