hope I got the merge wright...
[monitor.git] / monitor / util / sshknownhosts.py
similarity index 96%
rename from monitor/getsshkeys.py
rename to monitor/util/sshknownhosts.py
index 686252b..9fbedaa 100755 (executable)
@@ -175,15 +175,5 @@ class SSHKnownHosts:
                #return rec
                return (host, ip, key, "PlanetLab_%s" % s_date) 
 
-
-def main(hosts):
-       k = SSHKnownHosts()
-       if len (hosts) > 0:
-               for host in hosts:
-                       k.updateDirect(host)
-       else:
-               k.updateAll()
-       k.write()
-
-if __name__ == '__main__':
-       main(sys.argv[1:])
+if __name__ == "__main__":
+       print "ERROR: Can not execute module as a command! Please use tools/getsshkey.py"