findVersion1_8 doesn't take modded or prerelease versions
This commit is contained in:
parent
a7cf8b5853
commit
e17f7af634
@ -95,11 +95,19 @@ class MCInstall(object):
|
||||
for v in self.versions:
|
||||
major, minor, rev = splitVersion(v)
|
||||
if (major, minor) >= (1, 8):
|
||||
if rev == "":
|
||||
return v
|
||||
try:
|
||||
rev = int(rev) # skip revs like ".2-pre1" and ".1-OptiFine_HD_U_C7", only accept full releases
|
||||
return v
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def splitVersion(version):
|
||||
"""
|
||||
Split a Minecraft version ID into major, minor, and revision. If the version could not be parsed, return (0, 0, "")
|
||||
The revision is returned with the leading period. For example, if "1.8.1-pre3" is passed, (1, 8, ".1-pre3") will
|
||||
be returned.
|
||||
|
||||
:param version:
|
||||
:type version: unicode
|
||||
|
Reference in New Issue
Block a user