Beispiel #1
0
 def connect(self, *args):
     # connect, check auth
     if not self.proxy:
         self.setStatus(_("Connecting..."), 0)
         proxy = HttpSyncServerProxy(self.user, self.pwd)
         proxy.sourcesToCheck = self.sourcesToCheck
         proxy.connect("ankiqt-" + ankiqt.appVersion)
         self.proxy = proxy
         # check clock
         timediff = abs(proxy.timestamp - time.time())
         if timediff > 300:
             self.emit(SIGNAL("syncClockOff"), timediff)
             raise SyncError(type="clockOff")
     return self.proxy
Beispiel #2
0
 def connect(self, *args):
     # connect, check auth
     proxy = HttpSyncServerProxy(self.user, self.pwd)
     proxy.sourcesToCheck = self.sourcesToCheck
     proxy.connect("ankiqt-" + ankiqt.appVersion)
     return proxy