Commit dad5e779 authored by Frede Hundewadt's avatar Frede Hundewadt

remove dead code

parent 4ced249e
......@@ -61,42 +61,13 @@ def build_mirror_list(self, limit):
print(".: {}: {} - {}".format(txt.INF_CLR,
txt.QUERY_MIRRORS,
txt.TAKES_TIME))
# probe the mirrors
worklist = testMirrorFn.test_mirrors(self, up_to_date_mirrors, limit)
# counter = 0
# cols, lines = util.terminal_size()
# for mirror in up_to_date_mirrors:
# if not self.quiet:
# message = " ..... {:<15}: {}: {}".format(
# mirror["country"], mirror["last_sync"], mirror["url"])
# print("{:.{}}".format(message, cols), end="")
# sys.stdout.flush()
# resp_time = httpFn.get_mirror_response(mirror["url"],
# maxwait=self.max_wait_time,
# quiet=self.quiet)
# mirror["resp_time"] = resp_time
# if float(resp_time) > self.max_wait_time:
# if not self.quiet:
# print("\r")
# else:
# if not self.quiet:
# print("\r {:<5}{}{} ".format(color.GREEN,
# resp_time,
# color.ENDCOLOR))
# worklist.append(mirror)
# counter += 1
# """
# Equality check will stop execution
# when the desired number is reached.
# In the possible event the first mirror's
# response time exceeds the predefined response time,
# the loop would stop execution if the check for zero is not present
# """
# if counter is not 0 and counter == number:
# break
worklist = sort_mirrors(worklist)
# sort the result
worklist = sort_mirrors(worklist, field="resp_time", reverse=False)
"""
Try to write mirrorlist
Write mirrorlist
"""
try:
_ = worklist[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment