Do not crash if the returned remote version is None

That happens in case of errors.

Now it correctly shows an error.
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2016-03-21 14:39:35 +01:00
parent 64496c4ea1
commit cf2115b383

View File

@ -110,7 +110,9 @@ class relForm(QtWidgets.QMainWindow):
from relational import maintenance
online = maintenance.check_latest_version()
if online > version:
if online is None:
r = QtWidgets.QApplication.translate("Form", "Network error")
elif online > version:
r = QtWidgets.QApplication.translate(
"Form", "New version available online: %s." % online)
elif online == version: