set timeout to 10 seconds on sync

This commit is contained in:
Damien Elmes 2008-10-11 18:19:18 +09:00
parent aa1a5fcc0d
commit 0d87b6f32d
2 changed files with 2 additions and 1 deletions

View file

@ -49,7 +49,6 @@ class Exporter(object):
return True return True
return False return False
# FIXME: media support
class AnkiExporter(Exporter): class AnkiExporter(Exporter):
key = _("Anki decks (*.anki)") key = _("Anki decks (*.anki)")

View file

@ -868,6 +868,8 @@ class HttpSyncServerProxy(SyncServer):
def connect(self, clientVersion=""): def connect(self, clientVersion=""):
"Check auth, protocol & grab deck list." "Check auth, protocol & grab deck list."
if not self.decks: if not self.decks:
import socket
socket.setdefaulttimeout(10)
d = self.runCmd("getDecks", d = self.runCmd("getDecks",
libanki=anki.version, libanki=anki.version,
client=clientVersion, client=clientVersion,