Safety check: if Apache releases version without a decimal

This commit is contained in:
James Kasten 2014-12-03 04:47:41 -08:00
parent afd67d10f0
commit a234cdf90e

View file

@ -1299,7 +1299,10 @@ LogLevel warn \n\
num_decimal = matches[0].count(".")
# Format return value such as 2.47 rather than 2.4.7
return float("".join(matches[0].rsplit(".", num_decimal-1)))
if num_decimal > 0:
return float("".join(matches[0].rsplit(".", num_decimal-1)))
return float(matches[0])
###########################################################################
# Challenges Section