diff --git a/setup/hosting.py b/setup/hosting.py index 7d16354bd4..9ec1a34a3b 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -508,12 +508,14 @@ def upload_to_servers(files, version): # {{{ def upload_to_dbs(files, version): # {{{ print('Uploading to fosshub.com') + sys.stdout.flush() server = 'mirror1.fosshub.com' rdir = 'release/' check_call(['ssh', 'kovid@%s' % server, 'rm -f release/*']) for x in files: start = time.time() print ('Uploading', x) + sys.stdout.flush() for i in range(5): try: check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x, @@ -522,10 +524,12 @@ def upload_to_dbs(files, version): # {{{ raise SystemExit(1) except: print ('\nUpload failed, trying again in 30 seconds') + sys.stdout.flush() time.sleep(30) else: break print ('Uploaded in', int(time.time() - start), 'seconds\n\n') + sys.stdout.flush() check_call(['ssh', 'kovid@%s' % server, '/home/kovid/uploadFiles']) # }}} diff --git a/setup/upload.py b/setup/upload.py index 0475773e01..5d1936c739 100644 --- a/setup/upload.py +++ b/setup/upload.py @@ -70,6 +70,10 @@ class ReUpload(Command): # {{{ def pre_sub_commands(self, opts): opts.replace = True + exists = {x for x in installers() if os.path.exists(x)} + if not exists: + print ('There appear to be no installers!') + raise SystemExit(1) def run(self, opts): upload_signatures()