split config.py and parser.py into two modules. updated all files to use the
[monitor.git] / getsshkeys.py
index fc306e4..eee1fdc 100755 (executable)
@@ -8,7 +8,7 @@ import xml, xmlrpclib
 
 args = {}
 args['known_hosts'] =  os.environ['HOME'] + os.sep + ".ssh" + os.sep + "known_hosts"
-args['XMLRPC_SERVER'] = 'https://www.planet-lab.org/PLCAPI/'
+args['XMLRPC_SERVER'] = 'https://boot.planet-lab.org/PLCAPI/'
 
 class SSHKnownHosts:
        def __init__(self, args = args):
@@ -154,7 +154,7 @@ class SSHKnownHosts:
 
                key = key.strip()
                # TODO: check for '==' at end of key.
-               if key[-1] != '=':
+               if len(key) > 0 and key[-1] != '=':
                        print "Host with corrupt key! for %s %s" % (node['boot_state'], node['hostname'])
 
                s_date = time.strftime("%Y/%m/%d_%H:%M:%S",time.gmtime(time.time()))