This commit is contained in:
root 2020-04-10 17:36:01 -04:00
parent c9e4f87056
commit 36cdbcbd12
2 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,9 @@ openvpn-status==0.2.1
parso==0.6.2
pexpect==4.8.0
pickleshare==0.7.5
pkg-resources==0.0.0
prompt-toolkit==3.0.5
psutil==5.7.0
ptyprocess==0.6.0
pycodestyle==2.5.0
Pygments==2.6.1
@ -26,7 +28,9 @@ pylint==2.4.4
python-dateutil==2.8.1
pyzmq==19.0.0
six==1.14.0
tailer==0.4.1
tornado==6.0.4
traitlets==4.3.3
typed-ast==1.4.1
wcwidth==0.1.9
wrapt==1.11.2

View File

@ -129,8 +129,7 @@ class OManager:
n_down = 2
weights = []
for i in self.instances:
ping_stat = i["op"].get_ping_stat(
).splitlines()[-max(n_up, n_down):]
ping_stat = i["op"].get_ping_stat(lines=max(n_up, n_down))
ping_stat = [i.split(",")[-1] != "-1" for i in ping_stat]
#print("ping status:", ping_stat)
def all_equal(n, status):