Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 235857
Collapse All | Expand All

(-)mirrorselect (-1 / +8 lines)
Lines 7-13 Link Here
7
__revision__ = '1.3'
7
__revision__ = '1.3'
8
8
9
import sys
9
import sys
10
import os, time, popen2, re, shutil, signal, shlex, string
10
import os, time, popen2, re, shutil, signal, socket, shlex, string, urlparse
11
from HTMLParser import HTMLParser
11
from HTMLParser import HTMLParser
12
from optparse import IndentedHelpFormatter, OptionParser
12
from optparse import IndentedHelpFormatter, OptionParser
13
	
13
	
Lines 467-472 Link Here
467
			fetch_cmd = 'fetch -o /dev/null -q %s' % (url)
467
			fetch_cmd = 'fetch -o /dev/null -q %s' % (url)
468
		if fetch == 'curl':
468
		if fetch == 'curl':
469
			fetch_cmd = 'curl -o /dev/null -s --retry 1' % (url)
469
			fetch_cmd = 'curl -o /dev/null -s --retry 1' % (url)
470
471
		"""
472
		Resolve hostname before fetching to avoid making the DNS resolution
473
		latency part of the timing
474
		"""
475
		hostname = urlparse.urlparse(url).hostname;
476
		socket.gethostbyname(hostname);
470
			
477
			
471
		stime = time.time()
478
		stime = time.time()
472
		delta = 0
479
		delta = 0

Return to bug 235857