Do not crash if the returned remote version is None

That happens in case of errors.

Now it correctly shows an error.
master
Salvo 'LtWorf' Tomaselli 2016-03-21 14:39:35 +07:00
parent 64496c4ea1
commit cf2115b383
1 changed files with 3 additions and 1 deletions

@ -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: