Merge branch 'master' into 'master'
Rework adl-submit.py so it can be used as a library See merge request agenda-libre/agenda-libre-ruby!20
This commit is contained in:
commit
567edd008e
@ -369,12 +369,7 @@ def SubmitEvent(event, testOutputFile):
|
||||
finally:
|
||||
curl.close()
|
||||
|
||||
|
||||
if (len(sys.argv) <= 1) or sys.argv[1] == "--help":
|
||||
Usage()
|
||||
|
||||
(event, testOutputFile) = ParseOptions(sys.argv[1:])
|
||||
|
||||
def ensure_latest_version_is_used():
|
||||
# Check that we are running the latest version of the adl-submit
|
||||
# script
|
||||
contents = io.BytesIO()
|
||||
@ -392,5 +387,15 @@ try:
|
||||
finally:
|
||||
curl.close()
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if (len(sys.argv) <= 1) or sys.argv[1] == "--help":
|
||||
Usage()
|
||||
|
||||
(event, testOutputFile) = ParseOptions(sys.argv[1:])
|
||||
|
||||
ensure_latest_version_is_used()
|
||||
|
||||
SubmitEvent(event, testOutputFile)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user