diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 386326d..7a62c22 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -289,13 +289,16 @@ class ConfigDialog(QtWidgets.QDialog): def loadLastUpdateCheckDate(self): settings = QSettings("Syncplay", "Interface") settings.beginGroup("Update") - self.lastCheckedForUpdates = settings.value("lastCheckedQt", None) - if self.lastCheckedForUpdates: - if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "": - if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"): + try: + self.lastCheckedForUpdates = settings.value("lastCheckedQt", None) + if self.lastCheckedForUpdates: + if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "": + if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"): + self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") + else: self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") - else: - self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") + except: + self.lastCheckedForUpdates = None def loadSavedPublicServerList(self): settings = QSettings("Syncplay", "Interface")