Tags should now be correctly managed in the adl-submit script. Closes #92

This commit is contained in:
echarp 2017-05-04 23:17:43 +02:00
parent a048844ce1
commit 9c515a5cf1
2 changed files with 3 additions and 5 deletions

View File

@ -1 +1 @@
3.4
3.5

View File

@ -202,7 +202,6 @@ def ParseOptions(options):
return (eventFieldValues, testOutputFile)
def getAuthToken(baseUrl):
curl = pycurl.Curl()
contents = StringIO.StringIO()
@ -218,7 +217,6 @@ def getAuthToken(baseUrl):
return m[0][1]
def SubmitEvent(event, testOutputFile):
if not event.has_key ("end-date") and event.has_key('start-date'):
event ["end-date"] = event ["start-date"]
@ -340,7 +338,7 @@ def SubmitEvent(event, testOutputFile):
('event[url]', event['url'].encode('utf-8')),
('event[contact]', event['contact'].encode('utf-8')),
('event[submitter]', event['submitter'].encode('utf-8')),
('event[tags]', event['tags'].encode('utf-8'))])
('event[tag_list]', event['tags'].encode('utf-8'))])
curl.setopt(pycurl.COOKIEJAR, '/tmp/cookie.txt')
curl.setopt(pycurl.COOKIEFILE, '/tmp/cookie.txt')
@ -377,7 +375,7 @@ 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.4'):
if float(contents.getvalue()) != float('3.5'):
print u"Votre script n'est plus à jour, merci de télécharger la nouvelle version à l'adresse"
print u"%sadl-submit.py" % baseUrl
sys.exit(1)