mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
treat an empty response like any other sync error
This commit is contained in:
parent
43e02439f1
commit
29978fffb8
2 changed files with 1 additions and 10 deletions
|
@ -2197,7 +2197,6 @@ it to your friends.
|
||||||
self.syncThread = ui.sync.Sync(self, u, p, interactive, onlyMerge)
|
self.syncThread = ui.sync.Sync(self, u, p, interactive, onlyMerge)
|
||||||
self.connect(self.syncThread, SIGNAL("setStatus"), self.setSyncStatus)
|
self.connect(self.syncThread, SIGNAL("setStatus"), self.setSyncStatus)
|
||||||
self.connect(self.syncThread, SIGNAL("showWarning"), self.showSyncWarning)
|
self.connect(self.syncThread, SIGNAL("showWarning"), self.showSyncWarning)
|
||||||
self.connect(self.syncThread, SIGNAL("noSyncResponse"), self.noSyncResponse)
|
|
||||||
self.connect(self.syncThread, SIGNAL("moveToState"), self.moveToState)
|
self.connect(self.syncThread, SIGNAL("moveToState"), self.moveToState)
|
||||||
self.connect(self.syncThread, SIGNAL("noMatchingDeck"), self.selectSyncDeck)
|
self.connect(self.syncThread, SIGNAL("noMatchingDeck"), self.selectSyncDeck)
|
||||||
self.connect(self.syncThread, SIGNAL("syncClockOff"), self.syncClockOff)
|
self.connect(self.syncThread, SIGNAL("syncClockOff"), self.syncClockOff)
|
||||||
|
@ -2347,12 +2346,6 @@ This deck already exists on your computer. Overwrite the local copy?"""),
|
||||||
ui.preferences.Preferences(self, self.config).dialog.tabWidget.\
|
ui.preferences.Preferences(self, self.config).dialog.tabWidget.\
|
||||||
setCurrentIndex(1)
|
setCurrentIndex(1)
|
||||||
|
|
||||||
def noSyncResponse(self):
|
|
||||||
msg = _("Sync Failed. Please check your internet connection.")
|
|
||||||
if self.config['proxyHost']:
|
|
||||||
msg += _(" (and proxy settings)")
|
|
||||||
self.setNotice(msg)
|
|
||||||
|
|
||||||
def openSyncProgress(self):
|
def openSyncProgress(self):
|
||||||
self.syncProgressDialog = QProgressDialog(_("Syncing Media..."),
|
self.syncProgressDialog = QProgressDialog(_("Syncing Media..."),
|
||||||
"", 0, 0, self)
|
"", 0, 0, self)
|
||||||
|
|
|
@ -56,9 +56,7 @@ class Sync(QThread):
|
||||||
def error(self, error):
|
def error(self, error):
|
||||||
if getattr(error, 'data', None) is None:
|
if getattr(error, 'data', None) is None:
|
||||||
error.data = {}
|
error.data = {}
|
||||||
if error.data.get('type') == 'noResponse':
|
if error.data.get('type') == 'clockOff':
|
||||||
self.emit(SIGNAL("noSyncResponse"))
|
|
||||||
elif error.data.get('type') == 'clockOff':
|
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
error = self.getErrorMessage(error)
|
error = self.getErrorMessage(error)
|
||||||
|
|
Loading…
Reference in a new issue