eric6/WebBrowser/AdBlock/AdBlockSubscription.py

changeset 8260
2161475d9639
parent 8218
7c09585bd960
equal deleted inserted replaced
8259:2bbec88047dd 8260:2161475d9639
343 343
344 def checkForUpdate(self): 344 def checkForUpdate(self):
345 """ 345 """
346 Public method to check for an update. 346 Public method to check for an update.
347 """ 347 """
348 if self.__updatePeriod: 348 updatePeriod = (
349 updatePeriod = self.__updatePeriod 349 self.__updatePeriod
350 else: 350 if self.__updatePeriod else
351 updatePeriod = ( 351 Preferences.getWebBrowser("AdBlockUpdatePeriod") * 24
352 Preferences.getWebBrowser("AdBlockUpdatePeriod") * 24 352 )
353 )
354 if ( 353 if (
355 not self.__lastUpdate.isValid() or 354 not self.__lastUpdate.isValid() or
356 (self.__remoteModified.isValid() and 355 (self.__remoteModified.isValid() and
357 self.__remoteModified.addSecs(updatePeriod * 3600) < 356 self.__remoteModified.addSecs(updatePeriod * 3600) <
358 QDateTime.currentDateTime()) or 357 QDateTime.currentDateTime()) or

eric ide

mercurial