Skip to content

Commit 2ddf71c

Browse files
committed
Fixing index out of range
1 parent 7bdc6d9 commit 2ddf71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mirrorscript-v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def run(self):
7777
if "100% packet loss" in p[0].strip():
7878
average = "[!] Unable to check " + self.hostname + " latency, potentially host block ICMP request."
7979
else:
80-
average = p[0].strip().splitlines()[7].split('=')[1].split('/')[1]
80+
average = p[0].strip().splitlines()[-1].split('=')[1].split('/')[1]
8181
mirrors[self.hostname] = str(str(average).zfill(7))
8282
except Exception as e:
8383
if not ask("\t[!] Something went wrong. would you like to try again [y] or [n].",'y'):

0 commit comments

Comments
 (0)