From 0d87b6f32d762eabc65550598dba339bfa826c8c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 11 Oct 2008 18:19:18 +0900 Subject: [PATCH] set timeout to 10 seconds on sync --- anki/exporting.py | 1 - anki/sync.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/exporting.py b/anki/exporting.py index 4f62d76a9..38759293f 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -49,7 +49,6 @@ class Exporter(object): return True return False -# FIXME: media support class AnkiExporter(Exporter): key = _("Anki decks (*.anki)") diff --git a/anki/sync.py b/anki/sync.py index 52e29153c..7102cf8d5 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -868,6 +868,8 @@ class HttpSyncServerProxy(SyncServer): def connect(self, clientVersion=""): "Check auth, protocol & grab deck list." if not self.decks: + import socket + socket.setdefaulttimeout(10) d = self.runCmd("getDecks", libanki=anki.version, client=clientVersion,