From 028637970638d41c7e8b09ce33836da7caff394f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 31 Aug 2013 10:36:13 +0800 Subject: [PATCH] Don't require multipart for uploading to S3. The file we are uploading is not large, and multipart works really bad on bad networking. --- script/upload.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/script/upload.py b/script/upload.py index 7595b045eec..4d1fb6e0bce 100755 --- a/script/upload.py +++ b/script/upload.py @@ -24,24 +24,10 @@ DIST_NAME = 'atom-shell-{0}-{1}.zip'.format(get_atom_shell_version(), def main(): - try: - ensure_s3put() - if not dist_newer_than_head(): - create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py') - subprocess.check_call([sys.executable, create_dist]) - upload() - except AssertionError as e: - return e.message - - -def ensure_s3put(): - output = '' - try: - output = subprocess.check_output(['s3put', '--help']) - except OSError as e: - if e.errno != errno.ENOENT: - raise - assert 'multipart' in output, 'Error: Please install boto and filechunkio' + if not dist_newer_than_head(): + create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py') + subprocess.check_call([sys.executable, create_dist]) + upload() def dist_newer_than_head():