if serverContents[i] > localContents[i]:
Notice that you never initialized i to a default value. It is looking up in your code to see if you had defined and set it outside the function (which you did not).
Put in a loop
for i in range(len(serverContents)):
You should also check that both lists are the same size or you will get an error when you try to index past the end.
Note that this assumes that the serverContents and localContents are both lists each of whose elements is a value to be compared. If the contents are text strings. then you will be looping over each character in the string. If that is what you want, you do not need to do it
f = '1.1a'
g = '1.1a'
f == g # shows True
f is g # shows False
This will mean that '1.1a' and '01.1a' will show different
However, this will allow for the case where version number is not totally numeric, which is a requirement if you use float(serverContents).