Make sure pkghost is up, abort otherwise.

This commit is contained in:
Jon Ciesla 2012-09-26 08:16:43 -05:00
parent a087289f9a
commit ec9e60917a

View file

@ -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: