gnome3.updateScript: improve pre-release detection

Previously all versions with minor >= 90 were considered pre-release,
which failed to consider versions like 0.100.

Let’s limit the range to 90–99 and 900–999.
This commit is contained in:
Jan Tojnar 2018-11-20 21:53:55 +01:00
parent f19b76bc56
commit 440d84cfb1
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -12,7 +12,7 @@ def odd_unstable(version_str, selected):
return True
even = version[1] % 2 == 0
prerelease = version[1] >= 90
prerelease = (version[1] >= 90 and version[1] < 100) or (version[1] >= 900 and version[1] < 1000)
stable = even and not prerelease
if selected == 'stable':
return stable