--- a/eric6/WebBrowser/History/HistoryManager.py Wed Apr 21 19:40:50 2021 +0200 +++ b/eric6/WebBrowser/History/HistoryManager.py Thu Apr 22 18:02:47 2021 +0200 @@ -360,10 +360,11 @@ checkForExpired = QDateTime(self.__history[-1].dateTime) checkForExpired.setDate( checkForExpired.date().addDays(self.__daysToExpire)) - if now.daysTo(checkForExpired) > 7: - nextTimeout = 7 * 86400 - else: - nextTimeout = now.secsTo(checkForExpired) + nextTimeout = ( + 7 * 86400 + if now.daysTo(checkForExpired) > 7 else + now.secsTo(checkForExpired) + ) if nextTimeout > 0: break