Avoid error on unexpected last update check format when changing between Python versions (#170)

This commit is contained in:
Etoh 2018-01-13 14:45:43 +00:00
parent e1b12327fd
commit 79c34f823e

View File

@ -289,6 +289,7 @@ class ConfigDialog(QtWidgets.QDialog):
def loadLastUpdateCheckDate(self):
settings = QSettings("Syncplay", "Interface")
settings.beginGroup("Update")
try:
self.lastCheckedForUpdates = settings.value("lastCheckedQt", None)
if self.lastCheckedForUpdates:
if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "":
@ -296,6 +297,8 @@ class ConfigDialog(QtWidgets.QDialog):
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")