From ec9e60917a60348e0a3f8f0a40387486df1b63b9 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 26 Sep 2012 08:16:43 -0500 Subject: [PATCH] Make sure pkghost is up, abort otherwise. --- scripts/process-git-requests/process-git-requests | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/process-git-requests/process-git-requests b/scripts/process-git-requests/process-git-requests index 59dc175..44a6ed8 100755 --- a/scripts/process-git-requests/process-git-requests +++ b/scripts/process-git-requests/process-git-requests @@ -35,6 +35,7 @@ import tempfile import time import xmlrpclib import webbrowser +import socket from configobj import ConfigObj, flatten_errors from fedora.client import AccountSystem, AuthError, AppError, PackageDB from optparse import OptionParser @@ -751,6 +752,14 @@ if __name__ == '__main__': print "Bugzilla call failed:" print e exit(1) + print "Making sure " + options.pkghost + " is available..." + try: + sshsock = socket.create_connection((options.pkghost, 22)) + sshsock.close() + except Exception, e: + print options.pkghost + " unavailable." + print e + exit(1) print "Querying bugzilla..." try: