remove idx
This commit is contained in:
@@ -33,12 +33,11 @@ def parse_top_string(data):
|
|||||||
return load, cpu_percent, ram_total, ram_free
|
return load, cpu_percent, ram_total, ram_free
|
||||||
|
|
||||||
class Host(threading.Thread):
|
class Host(threading.Thread):
|
||||||
def __init__(self, host, port, host_length, idx):
|
def __init__(self, host, port, host_length):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.host_length = host_length
|
self.host_length = host_length
|
||||||
self.idx = idx
|
|
||||||
self.status = 'none'
|
self.status = 'none'
|
||||||
self.row = ''
|
self.row = ''
|
||||||
|
|
||||||
@@ -105,7 +104,7 @@ def main():
|
|||||||
continue
|
continue
|
||||||
if not 'port' in host:
|
if not 'port' in host:
|
||||||
host['port'] = 22
|
host['port'] = 22
|
||||||
hosts.append(Host(host['host'], host['port'] or 22, host_length, i))
|
hosts.append(Host(host['host'], host['port'] or 22, host_length))
|
||||||
|
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
host.start()
|
host.start()
|
||||||
|
|||||||
5
sync.py
5
sync.py
@@ -33,14 +33,13 @@ def parse_top_string(data):
|
|||||||
return load, cpu_percent, ram_total, ram_free
|
return load, cpu_percent, ram_total, ram_free
|
||||||
|
|
||||||
class Host(threading.Thread):
|
class Host(threading.Thread):
|
||||||
def __init__(self, host, port, user, keys, host_length, idx):
|
def __init__(self, host, port, user, keys, host_length):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.user = user
|
self.user = user
|
||||||
self.keys = keys
|
self.keys = keys
|
||||||
self.host_length = host_length
|
self.host_length = host_length
|
||||||
self.idx = idx
|
|
||||||
self.status = 'none'
|
self.status = 'none'
|
||||||
self.row = ''
|
self.row = ''
|
||||||
|
|
||||||
@@ -108,7 +107,7 @@ def main():
|
|||||||
continue
|
continue
|
||||||
if not 'port' in host:
|
if not 'port' in host:
|
||||||
host['port'] = 22
|
host['port'] = 22
|
||||||
hosts.append(Host(host['host'], host['port'] or 22, user_name, host_keys, host_length, i))
|
hosts.append(Host(host['host'], host['port'] or 22, user_name, host_keys, host_length))
|
||||||
|
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
host.start()
|
host.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user