Script version number is always verified

This commit is contained in:
echarp 2016-01-08 18:23:23 +01:00
parent 0c971e62a0
commit 3b44231b4b

View File

@ -380,13 +380,12 @@ if (len(sys.argv) <= 1) or sys.argv[1] == "--help":
# Check that we are running the latest version of the adl-submit
# script
if not testOutputFile:
contents = StringIO.StringIO()
curl = pycurl.Curl()
curl.setopt(curl.WRITEFUNCTION, contents.write)
curl.setopt (curl.URL, baseUrl + './adl-submit-latest-version')
curl.perform()
if curl.getinfo(curl.HTTP_CODE) == 200:
contents = StringIO.StringIO()
curl = pycurl.Curl()
curl.setopt(curl.WRITEFUNCTION, contents.write)
curl.setopt (curl.URL, baseUrl + './adl-submit-latest-version')
curl.perform()
if curl.getinfo(curl.HTTP_CODE) == 200:
if float(contents.getvalue()) != float('3.3'):
print u"Votre script n'est plus à jour, merci de télécharger la nouvelle version à l'adresse"
print u"%sadl-submit.py" % baseUrl