From b2504f49f9e30e3ffa07ec3ab11d6b465829b593 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Wed, 27 Mar 2019 12:14:15 +0100 Subject: [PATCH] Updates --- upload | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upload b/upload index 65619d6..6a91be8 100755 --- a/upload +++ b/upload @@ -25,7 +25,7 @@ def find_ais(path): return [Ai(x) for x in os.listdir(path) if not x.startswith('__')] def upload_ai(ai): - print_yellow("Zipping " + ai.name + "...") + print_yellow("Zipping the AI...") zip = zipfile.ZipFile('.archive.zip', mode = 'w') try: for file in os.listdir(AIS_DIR + "/" + ai.path): @@ -33,12 +33,15 @@ def upload_ai(ai): finally: zip.close() + print_yellow("Uploading the AI...") try: subprocess.check_call([ 'curl', '-X', 'POST', '-F', 'archive=@.archive.zip', '-F', 'name=' + ai.name, 'http://pytron.tforgione.fr/upload-target/'], stderr = subprocess.DEVNULL, stdout = subprocess.DEVNULL) + + print_green("Upload finished!") except subprocess.CalledProcessError: print_red('An error occured while uploading the AI...')