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

(-)a/mirrorselect/selectors.py (-4 / +12 lines)
Lines 65-70 class Shallow(object): Link Here
65
	"""handles rapid server selection via netselect"""
65
	"""handles rapid server selection via netselect"""
66
66
67
	def __init__(self, hosts, options, output):
67
	def __init__(self, hosts, options, output):
68
		self._options = options
68
		self.output = output
69
		self.output = output
69
		self.urls = []
70
		self.urls = []
70
71
Lines 94-103 class Shallow(object): Link Here
94
95
95
		host_string = ' '.join(hosts)
96
		host_string = ' '.join(hosts)
96
97
97
		self.output.write('\nnetselect(): running "netselect -s%d %s"\n'
98
		cmd = ['netselect', '-s%d' % (number,)]
98
			% (int(number), host_string), 2)
99
		if self._options.ipv4:
100
			cmd.append('-4')
101
		elif self._options.ipv6:
102
			cmd.append('-6')
99
103
100
		proc = subprocess.Popen( ['netselect', '-s%d' % (number,)] + hosts,
104
		cmd.extend(hosts)
105
106
		self.output.write('\nnetselect(): running "%s"\n'
107
			% ' '.join(cmd), 2)
108
109
		proc = subprocess.Popen(cmd,
101
			stdout=subprocess.PIPE, stderr=subprocess.PIPE)
110
			stdout=subprocess.PIPE, stderr=subprocess.PIPE)
102
111
103
		out, err = proc.communicate()
112
		out, err = proc.communicate()
104
- 

Return to bug 582508