Tags should now be correctly managed in the adl-submit script. Closes #92
This commit is contained in:
parent
a048844ce1
commit
9c515a5cf1
@ -1 +1 @@
|
||||
3.4
|
||||
3.5
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user