diff -r 0a02c433f52d -r 5883ce99ee12 Helpviewer/AdBlock/AdBlockSubscription.py --- a/Helpviewer/AdBlock/AdBlockSubscription.py Fri Nov 01 15:48:48 2013 +0100 +++ b/Helpviewer/AdBlock/AdBlockSubscription.py Sun Nov 03 15:58:22 2013 +0100 @@ -271,8 +271,8 @@ None, self.trUtf8("Load subscription rules"), self.trUtf8( - """Unable to open adblock file '{0}' for reading.""")\ - .format(fileName)) + """Unable to open adblock file '{0}' for reading.""") + .format(fileName)) else: textStream = QTextStream(f) header = textStream.readLine(1024) @@ -281,8 +281,8 @@ None, self.trUtf8("Load subscription rules"), self.trUtf8("""AdBlock file '{0}' does not start""" - """ with [Adblock.""")\ - .format(fileName)) + """ with [Adblock.""") + .format(fileName)) f.close() f.remove() self.__lastUpdate = QDateTime() @@ -333,8 +333,8 @@ else: updatePeriod = Preferences.getHelp("AdBlockUpdatePeriod") * 24 if not self.__lastUpdate.isValid() or \ - (self.__remoteModified.isValid() and \ - self.__remoteModified.addSecs(updatePeriod * 3600) < \ + (self.__remoteModified.isValid() and + self.__remoteModified.addSecs(updatePeriod * 3600) < QDateTime.currentDateTime()) or \ self.__lastUpdate.addSecs(updatePeriod * 3600) < \ QDateTime.currentDateTime(): @@ -381,7 +381,7 @@ self.trUtf8( """<p>Subscription rules could not be""" """ downloaded.</p><p>Error: {0}</p>""") - .format(reply.errorString())) + .format(reply.errorString())) else: # reset after first download attempt self.__defaultSubscription = False @@ -402,8 +402,8 @@ None, self.trUtf8("Downloading subscription rules"), self.trUtf8( - """Unable to open adblock file '{0}' for writing.""")\ - .file(fileName)) + """Unable to open adblock file '{0}' for writing.""") + .file(fileName)) return f.write(response) f.close() @@ -458,9 +458,9 @@ """ checksum.<br/>""" """Found: {1}<br/>""" """Calculated: {2}<br/>""" - """Use it anyway?</p>""")\ - .format(self.__title, expectedChecksum, - calculatedChecksum)) + """Use it anyway?</p>""") + .format(self.__title, expectedChecksum, + calculatedChecksum)) return res def saveRules(self): @@ -477,8 +477,8 @@ None, self.trUtf8("Saving subscription rules"), self.trUtf8( - """Unable to open adblock file '{0}' for writing.""")\ - .format(fileName)) + """Unable to open adblock file '{0}' for writing.""") + .format(fileName)) return textStream = QTextStream(f)