# HG changeset patch # User Giulio Moro # Date 1466650016 -3600 # Node ID a084456960c9ce10f81e4c853e92695f9c44f80e # Parent 545087a05bc8dbc4a5c8fbbbea3a1444760efb40 updated heavy uploader diff -r 545087a05bc8 -r a084456960c9 scripts/hvresources/uploader.py --- a/scripts/hvresources/uploader.py Thu Jun 23 00:15:51 2016 +0100 +++ b/scripts/hvresources/uploader.py Thu Jun 23 03:46:56 2016 +0100 @@ -7,7 +7,6 @@ import requests import shutil import stat -import sys import tempfile import time import urlparse @@ -150,7 +149,7 @@ except Exception as e: print "{0}Error:{1} {2}".format(Colours.red, Colours.end, e) shutil.rmtree(temp_dir) # clean up the temporary directory - sys.exit(1) + return post_data["name"] = args.name @@ -272,7 +271,7 @@ for i,x in enumerate(r_json["errors"]): print "{3}) {0}Error:{1} {2}".format( Colours.red, Colours.end, x["detail"], i+1) - sys.exit(2) + return # retrieve all requested files for i,g in enumerate(args.gen): @@ -315,8 +314,7 @@ print "Job URL:", reply_json["data"]["links"]["self"] print "Total request time: {0}ms".format(int(1000.0*(time.time()-tick))) - print "Heavy version:", reply_json["meta"]["version"] - sys.exit(0) # success! + print "Heavy release:", reply_json.get("meta",{}).get("release", "default") def __get_file_url_for_generator(json_api, g): """Returns the file link for a specific generator.