From 69bab620c957466d9824e625a22dc3a80cd0800d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 17 Jan 2014 10:59:45 +0530 Subject: [PATCH] ... --- setup/hosting.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup/hosting.py b/setup/hosting.py index 9ec1a34a3b..462c0f9ac1 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en' import os, time, sys, traceback, subprocess, urllib2, re, base64, httplib, shutil from argparse import ArgumentParser, FileType -from subprocess import check_call +from subprocess import check_call, CalledProcessError from tempfile import NamedTemporaryFile from collections import OrderedDict @@ -530,7 +530,15 @@ def upload_to_dbs(files, version): # {{{ break print ('Uploaded in', int(time.time() - start), 'seconds\n\n') sys.stdout.flush() - check_call(['ssh', 'kovid@%s' % server, '/home/kovid/uploadFiles']) + try: + check_call(['ssh', 'kovid@%s' % server, '/home/kovid/uploadFiles']) + except CalledProcessError as err: + # fosshub is being a little flaky sshing into it is failing the first + # time, needing a retry + if err.returncode == 255: + check_call(['ssh', 'kovid@%s' % server, '/home/kovid/uploadFiles']) + else: + raise # }}} # CLI {{{