def get_info_from_server(self, command_info): if command_info == "/info": info = ServerInfo() info.local_distributive = platform.architecture() info.local_architecture = platform.linux_distribution() info.local_hostname = platform.uname()[1] info.local_os = platform.uname()[0] info.local_kernel = platform.release() else: print "Debug message: nothing to do :&(" return info
def get_info_server(self, command_info): if command_info == "/info": info = ServerInfo() info.local_distributive = platform.linux_distribution() info.local_architecture = platform.architecture() info.local_hostname = platform.uname()[0] info.local_kernel = platform.release() info.local_os = platform.uname()[1] else: print "Cant get info" return info
from FetchLoop import FetchLoop from ServerInfo import ServerInfo server = ServerInfo('202.101.208.35:25565') server2 = ServerInfo('202.101.208.35:25566') server.save() server2.save() fetchLoop = FetchLoop() fetchLoop.startLoop()
def __init__(self, host, user_name, password): ServerInfo.__init__(self, host, user_name, password) self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())