X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=getsshkeys.py;h=68d29452d1a97bd95dabc0e31312a0e53edaeb75;hb=4d56ef5473c6486c321dd2797be45b45b0606dae;hp=fbfc65e743bf4398eb09bfc479384f079c1c0c92;hpb=156cb49ba49cc7cc8a91e7319d3c6f765328108b;p=monitor.git diff --git a/getsshkeys.py b/getsshkeys.py index fbfc65e..68d2945 100755 --- a/getsshkeys.py +++ b/getsshkeys.py @@ -6,7 +6,7 @@ import string import time import xml, xmlrpclib try: - import config + from monitor import config auth = {'Username' : config.API_AUTH_USER, 'AuthMethod' : "password", 'AuthString' : config.API_AUTH_PASSWORD} @@ -17,7 +17,12 @@ except: args = {} args['known_hosts'] = os.environ['HOME'] + os.sep + ".ssh" + os.sep + "known_hosts" -args['XMLRPC_SERVER'] = 'https://boot.planet-lab.org/PLCAPI/' +try: + import config + args['XMLRPC_SERVER'] = config.API_SERVER +except: + args['XMLRPC_SERVER'] = 'https://boot.planet-lab.org/PLCAPI/' + print "Using default API server %s" % args['XMLRPC_SERVER'] class SSHKnownHosts: def __init__(self, args = args):