public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
  2014-01-31 15:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
@ 2014-03-02  7:44 ` Brian Dolbec
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Dolbec @ 2014-03-02  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     d872348a8172b17261cfc5d13ee87e0ea6c23fc1
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 15:35:11 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan 31 15:39:09 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=d872348a

Fix some long lines.

---
 mirrorselect/extractor.py |   4 +-
 mirrorselect/selectors.py | 134 +++++++++++++++++++++++++---------------------
 setup.py                  |   3 +-
 3 files changed, 78 insertions(+), 63 deletions(-)

diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py
index a949c75..217d1e1 100644
--- a/mirrorselect/extractor.py
+++ b/mirrorselect/extractor.py
@@ -37,8 +37,8 @@ USERAGENT = "Mirrorselect-" + version
 
 class Extractor(object):
 	"""The Extractor employs a MirrorParser3 object to get a list of valid
-	mirrors, and then filters them. Only the mirrors that should be tested, based on
-	user input are saved. They will be in the hosts attribute."""
+	mirrors, and then filters them. Only the mirrors that should be tested,
+	based on user input are saved. They will be in the hosts attribute."""
 
 	def __init__(self, list_url, options, output):
 		self.output = output

diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py
index 1544937..5d30695 100644
--- a/mirrorselect/selectors.py
+++ b/mirrorselect/selectors.py
@@ -82,13 +82,13 @@ class Shallow(object):
 		top_hosts = []
 
 		if not quiet:
-			self.output.print_info('Using netselect to choose the top %d mirrors...' \
-					% number)
+			self.output.print_info('Using netselect to choose the top '
+				'%d mirrors...' % number)
 
 		host_string = ' '.join(hosts)
 
-		self.output.write('\nnetselect(): running "netselect -s%d %s"\n' % (int(number),
-			host_string), 2)
+		self.output.write('\nnetselect(): running "netselect -s%d %s"\n'
+			% (int(number), host_string), 2)
 
 		proc = subprocess.Popen( ['netselect', '-s%d' % (number,)] + hosts,
 			stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -119,7 +119,8 @@ class Shallow(object):
 
 	def netselect_split(self, hosts, number, block_size):
 		"""
-		This uses netselect to test mirrors in chunks, each at most block_size in length.
+		This uses netselect to test mirrors in chunks,
+		each at most block_size in length.
 		This is done in a tournament style.
 		"""
 		hosts = [host[0] for host in hosts]
@@ -141,8 +142,8 @@ class Shallow(object):
 
 			host_dict = self.netselect(block, len(block), quiet=True)[1]
 
-			self.output.write('ran netselect(%s, %s), and got %s\n' % (block, len(block),
-				host_dict), 2)
+			self.output.write('ran netselect(%s, %s), and got %s\n'
+				% (block, len(block), host_dict), 2)
 
 			for key in list(host_dict.keys()):
 				ret_hosts[key] = host_dict[key]
@@ -165,7 +166,8 @@ class Shallow(object):
 
 	def host_blocks(self, hosts, block_size):
 		"""
-		Takes a list of hosts and a block size, and returns an list of lists of URLs.
+		Takes a list of hosts and a block size,
+		and returns an list of lists of URLs.
 		Each of the sublists is at most block_size in length.
 		"""
 		host_array = []
@@ -178,8 +180,9 @@ class Shallow(object):
 			mylist = []
 		host_array.append(hosts)
 
-		self.output.write('\n_host_blocks(): returns %s blocks, each about %s in size\n'
-				% (len(host_array), len(host_array[0])), 2)
+		self.output.write('\n_host_blocks(): returns '
+			'%s blocks, each about %s in size\n'
+			% (len(host_array), len(host_array[0])), 2)
 
 		return host_array
 
@@ -235,11 +238,13 @@ class Deep(object):
 
 			prog += 1
 			if self.test_file is not 'mirrorselect-test':
-				self.output.print_info('Downloading %s files from each mirror... [%s of %s]'\
-								% (self.test_file, prog, num_hosts) )
+				self.output.print_info(
+					'Downloading %s files from each mirror... [%s of %s]'
+					% (self.test_file, prog, num_hosts) )
 			else:
-				self.output.print_info('Downloading 100k files from each mirror... [%s of %s]'\
-								% (prog, num_hosts) )
+				self.output.print_info(
+					'Downloading 100k files from each mirror... [%s of %s]'
+					% (prog, num_hosts) )
 
 			mytime, ignore = self.deeptime(host, maxtime)
 
@@ -249,18 +254,20 @@ class Deep(object):
 			else:
 				continue
 
-		self.output.write('deeptest(): got %s hosts, and returned %s\n' % (num_hosts, \
-			str(list(top_hosts.values()))), 2)
+		self.output.write('deeptest(): got %s hosts, and returned %s\n'
+			% (num_hosts, str(list(top_hosts.values()))), 2)
 
 		self.output.write('\n')	#this just makes output nicer
 
-		#can't just return the dict.values, because we want the fastest mirror first...
+		#can't just return the dict.values,
+		#because we want the fastest mirror first...
 		keys = list(top_hosts.keys())
 		keys.sort()
 
 		rethosts = []
 		for key in keys:
-			#self.output.write('deeptest(): adding rethost %s, %s' % (key, top_hosts[key]), 2)
+			#self.output.write('deeptest(): adding rethost '
+				#'%s, %s' % (key, top_hosts[key]), 2)
 			rethosts.append(top_hosts[key])
 
 		self.output.write('deeptest(): final rethost %s\n' % (rethosts), 2)
@@ -298,17 +305,21 @@ class Deep(object):
 						ip = "[%s]" % ip
 					ips.append(ip)
 			except socket.error as e:
-				self.output.write('deeptime(): dns error for host %s: %s\n' % (url_parts.hostname, e), 2)
+				self.output.write('deeptime(): dns error for host %s: %s\n'
+					% (url_parts.hostname, e), 2)
 			except TimeoutException:
-				self.output.write('deeptime(): dns timeout for host %s\n' % url_parts.hostname, 2)
+				self.output.write('deeptime(): dns timeout for host %s\n'
+					% url_parts.hostname, 2)
 			finally:
 				signal.alarm(0)
 
 		if not ips:
-			self.output.write('deeptime(): unable to resolve ip for host %s\n' % url_parts.hostname, 2)
+			self.output.write('deeptime(): unable to resolve ip for host %s\n'
+				% url_parts.hostname, 2)
 			return (None, True)
 
-		self.output.write("deeptime(): ip's for host %s: %s\n" % (url_parts.hostname, str(ips)), 2)
+		self.output.write("deeptime(): ip's for host %s: %s\n"
+			% (url_parts.hostname, str(ips)), 2)
 		delta = 0
 		f = None
 
@@ -336,13 +347,11 @@ class Deep(object):
 			finally:
 				signal.alarm(0)
 		except EnvironmentError as e:
-			self.output.write(('deeptime(): closing connection to host %s ' + \
-				'failed for ip %s: %s\n') % \
-				(url_parts.hostname, ip, e), 2)
+			self.output.write(('deeptime(): closing connection to host %s '
+				'failed for ip %s: %s\n') % (url_parts.hostname, ip, e), 2)
 		except TimeoutException:
-			self.output.write(('deeptime(): closing connection to host %s ' + \
-				'timed out for ip %s\n') % \
-				(url_parts.hostname, ip), 2)
+			self.output.write(('deeptime(): closing connection to host %s '
+				'timed out for ip %s\n') % (url_parts.hostname, ip), 2)
 
 		self.output.write('deeptime(): timing url: %s\n' % test_url, 2)
 		try:
@@ -360,10 +369,12 @@ class Deep(object):
 				f.close()
 				if md5 != self.test_md5:
 					self.output.write(
-						"deeptime(): md5sum error for file: %s\n" % self.test_file +
+						"deeptime(): md5sum error for file: %s\n"
+						% self.test_file +
 						"         expected: %s\n" % self.test_md5 +
 						"         got.....: %s\n" % md5 +
-						"         host....: %s, %s\n" % (url_parts.hostname, ip))
+						"         host....: %s, %s\n"
+						% (url_parts.hostname, ip))
 					self.dl_failures += 1
 					return (None, True)
 
@@ -371,20 +382,19 @@ class Deep(object):
 				signal.alarm(0)
 
 		except EnvironmentError as e:
-			self.output.write(('deeptime(): download from host %s ' + \
-				'failed for ip %s: %s\n') % \
-				(url_parts.hostname, ip, e), 2)
+			self.output.write(('deeptime(): download from host %s '
+				'failed for ip %s: %s\n') % (url_parts.hostname, ip, e), 2)
 			return (None, True)
 		except TimeoutException:
-			self.output.write(('deeptime(): download from host %s ' + \
-				'timed out for ip %s\n') % \
-				(url_parts.hostname, ip), 2)
+			self.output.write(('deeptime(): download from host %s '
+				'timed out for ip %s\n') % (url_parts.hostname, ip), 2)
 			return (None, True)
 
 		signal.signal(signal.SIGALRM, signal.SIG_DFL)
 
 		self.output.write('deeptime(): download completed.\n', 2)
-		self.output.write('deeptime(): %s seconds for host %s\n' % (delta, url), 2)
+		self.output.write('deeptime(): %s seconds for host %s\n'
+			% (delta, url), 2)
 		return (delta, False)
 
 
@@ -403,21 +413,20 @@ class Deep(object):
 			finally:
 				signal.alarm(0)
 		except HTTPError as e:
-			self.output.write(('deeptime(): connection to host %s\n' + \
-				'            returned HTTPError: %s for ip %s\n'  \
-				'            Switching back to original url\n') % \
-				(url_parts.hostname, e, ip), 2)
+			self.output.write('deeptime(): connection to host %s\n'
+				'            returned HTTPError: %s for ip %s\n'
+				'            Switching back to original url\n'
+				% (url_parts.hostname, e, ip), 2)
 			if len(ips) == 1:
 				test_url = url_unparse(url_parts)
 				return self._test_connection(test_url, url_parts, ip, [])
 		except EnvironmentError as e:
-			self.output.write(('deeptime(): connection to host %s ' + \
-				'failed for ip %s:\n            %s\n') % \
-				(url_parts.hostname, ip, e), 2)
+			self.output.write('deeptime(): connection to host %s '
+				'failed for ip %s:\n            %s\n'
+				% (url_parts.hostname, ip, e), 2)
 		except TimeoutException:
-			self.output.write(('deeptime(): connection to host %s ' + \
-				'timed out for ip %s\n') % \
-				(url_parts.hostname, ip), 2)
+			self.output.write(('deeptime(): connection to host %s '
+				'timed out for ip %s\n') % (url_parts.hostname, ip), 2)
 		return f, test_url, early_out
 
 
@@ -426,24 +435,25 @@ class Deep(object):
 		Takes argumets ((time, host), maxtime, host_dict, maxlen)
 		Adds a new time:host pair to the dictionary of top hosts.
 		If the dictionary is full, the slowest host is removed to make space.
-		Returns the new maxtime, be it the specified timeout, or the slowest host.
+		Returns the new maxtime, be it the specified timeout,
+		or the slowest host.
 		"""
 		if len(host_dict) < maxlen:	#still have room, and host is fast. add it.
 
-			self.output.write('_list_add(): added host %s. with a time of %s\n' %
-					(time_host[1], time_host[0]), 2)
+			self.output.write('_list_add(): added host %s. with a time of %s\n'
+				% (time_host[1], time_host[0]), 2)
 
 			host_dict.update(dict([time_host]))
 			times = list(host_dict.keys())
 			times.sort()
 
 		else: #We need to make room in the dict before we add. Kill the slowest.
-			self.output.write('_list_add(): Adding host %s with a time of %s\n' %
-					(time_host[1], time_host[0]), 2)
+			self.output.write('_list_add(): Adding host %s with a time of %s\n'
+				% (time_host[1], time_host[0]), 2)
 			times = list(host_dict.keys())
 			times.sort()
-			self.output.write('_list_add(): removing %s\n' % host_dict[times[-1]],
-					2)
+			self.output.write('_list_add(): removing %s\n'
+				% host_dict[times[-1]], 2)
 			del host_dict[times[-1]]
 			host_dict.update(dict([time_host]))
 			#done adding. now return the appropriate time
@@ -455,8 +465,8 @@ class Deep(object):
 					' reusing timeout of %s sec.\n' % maxtime, 2)
 			retval = maxtime
 		else:
-			self.output.write('_list_add(): host_dict is full. Selecting the best'
-			' timeout\n', 2)
+			self.output.write('_list_add(): host_dict is full. '
+				'Selecting the best timeout\n', 2)
 			if times[-1] < maxtime:
 				retval = times[-1]
 			else:
@@ -476,7 +486,8 @@ class Interactive(object):
 		self.urls = []
 
 		self.interactive(hosts, options)
-		self.output.write('Interactive.interactive(): self.urls = %s\n' % self.urls, 2)
+		self.output.write('Interactive.interactive(): self.urls = %s\n'
+			% self.urls, 2)
 
 		if not self.urls or len(self.urls[0]) == 0:
 			sys.exit(1)
@@ -499,7 +510,8 @@ class Interactive(object):
 
 			dialog.extend(['20', '110', '14'])
 
-		for (url, args) in sorted(hosts, key = lambda x: (x[1]['country'].lower(), x[1]['name'].lower()) ):
+		for (url, args) in sorted(hosts, key = lambda x:
+				(x[1]['country'].lower(), x[1]['name'].lower()) ):
 			marker = ""
 			if options.rsync and not url.endswith("/gentoo-portage"):
 				url+="/gentoo-portage"
@@ -508,7 +520,8 @@ class Interactive(object):
 			if options.ipv6 and ( args['ipv6'] == 'n' ): continue
 			if options.ipv4 and ( args['ipv4'] == 'n' ): continue
 
-			#dialog.append('"%s" "%s%s: %s" "OFF"' % ( url, marker, args['country'], args['name']))
+			#dialog.append('"%s" "%s%s: %s" "OFF"'
+				#% ( url, marker, args['country'], args['name']))
 			dialog.extend(["%s" %url,
 				"%s%s: %s" %(marker, args['country'], args['name']),
 				 "OFF"])
@@ -522,7 +535,8 @@ class Interactive(object):
 
 		if self.urls:
 			if hasattr(self.urls[0], 'decode'):
-				self.urls = decode_selection([x.decode('utf-8').rstrip() for x in self.urls])
+				self.urls = decode_selection(
+					[x.decode('utf-8').rstrip() for x in self.urls])
 			else:
 				self.urls = decode_selection([x.rstrip() for x in self.urls])
 

diff --git a/setup.py b/setup.py
index 32c7e1d..df7b851 100755
--- a/setup.py
+++ b/setup.py
@@ -108,7 +108,8 @@ core.setup(
 	#package_data = test_data,
 	scripts=(['bin/mirrorselect']),
 	data_files=(
-		(os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man8'), ['mirrorselect.8']),
+		(os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man8'),
+		['mirrorselect.8']),
 	),
 	cmdclass={
 		'test': load_test(),


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
@ 2018-05-26 15:43 Brian Dolbec
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Dolbec @ 2018-05-26 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     d0f37a2cb9734439c2d69f74c16ffb0489a30280
Author:     i.Dark_Templar <darktemplar <AT> dark-templar-archives <DOT> net>
AuthorDate: Sat May 26 15:28:53 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat May 26 15:40:31 2018 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=d0f37a2c

Mirrorselect: add 'exclude' option to allow excluding hosts from mirrors list.

 mirrorselect.8       | 3 +++
 mirrorselect/main.py | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/mirrorselect.8 b/mirrorselect.8
index cd7b8bb..3a1e304 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -96,6 +96,9 @@ download mirrors. If this is not specified, a default of 1 is used.
 .TP
 .BI \-t " TIMEOUT " "\fR,\fP \-timeout" " TIMEOUT "
 Timeout for deep mode. Defaults to 10 seconds.
+.TP
+.BI \-e " EXCLUDE " "\fR,\fP \-exclude" " EXCLUDE "
+Exclude host from mirrors list.
 
 .SH "EXAMPLES"
 automatic:

diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index 04698f3..b49461b 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -243,6 +243,9 @@ class MirrorSelect(object):
 		group.add_option(
 			"-t", "--timeout", action="store", type="int",
 			default="10", help="Timeout for deep mode. Defaults to 10 seconds.")
+		group.add_option(
+			"-e", "--exclude", action="append", dest="exclude",
+			default=None, help="Exclude host from mirrors list.")
 
 
 
@@ -302,6 +305,10 @@ class MirrorSelect(object):
 		else:
 			self.output.write("using url: %s\n" % MIRRORS_3_XML, 2)
 			hosts = Extractor(MIRRORS_3_XML, options, self.output).hosts
+
+		if options.exclude:
+			hosts = [x for x in hosts if x[0] not in options.exclude]
+
 		return hosts
 
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
@ 2019-05-27 18:08 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2019-05-27 18:08 UTC (permalink / raw
  To: gentoo-commits

commit:     72aa138d7c866d42b3bfea011f3622c3c6db755d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 27 17:33:46 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 27 18:01:35 2019 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=72aa138d

Update version for 2.2.5 release

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 MANIFEST.in             | 1 +
 mirrorselect.8          | 2 +-
 mirrorselect/version.py | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..b562f73
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+recursive-include tests *.py

diff --git a/mirrorselect.8 b/mirrorselect.8
index 7db8c0c..5bdb43d 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -1,4 +1,4 @@
-.TH "mirrorselect" "8" "2.2.4"
+.TH "mirrorselect" "8" "2.2.5"
 
 .SH "NAME"
 .LP

diff --git a/mirrorselect/version.py b/mirrorselect/version.py
index abb971b..fefb0df 100644
--- a/mirrorselect/version.py
+++ b/mirrorselect/version.py
@@ -25,5 +25,5 @@ Distributed under the terms of the GNU General Public License v2
 
 """
 
-version = "2.2.4-git"
+version = "2.2.5-git"
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
@ 2019-07-17  5:09 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2019-07-17  5:09 UTC (permalink / raw
  To: gentoo-commits

commit:     823dd74dfc9cdfee5072c8595619b669625f5942
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 05:07:56 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 05:08:04 2019 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=823dd74d

Update version for 2.2.5 release

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 mirrorselect.8          | 2 +-
 mirrorselect/version.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mirrorselect.8 b/mirrorselect.8
index 5bdb43d..8f0f56e 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -1,4 +1,4 @@
-.TH "mirrorselect" "8" "2.2.5"
+.TH "mirrorselect" "8" "2.2.6"
 
 .SH "NAME"
 .LP

diff --git a/mirrorselect/version.py b/mirrorselect/version.py
index fefb0df..ce4f7f4 100644
--- a/mirrorselect/version.py
+++ b/mirrorselect/version.py
@@ -25,5 +25,5 @@ Distributed under the terms of the GNU General Public License v2
 
 """
 
-version = "2.2.5-git"
+version = "2.2.6-git"
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
@ 2022-05-30 23:12 Brian Dolbec
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Dolbec @ 2022-05-30 23:12 UTC (permalink / raw
  To: gentoo-commits

commit:     eb9a6203b721d7247f79cb8c991ef835f1b9e1f7
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 23:01:21 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon May 30 23:11:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=eb9a6203

Apply bug 730994 https filtering patch

Author: Peter Levine
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 mirrorselect.8            | 3 +++
 mirrorselect/extractor.py | 2 +-
 mirrorselect/main.py      | 7 +++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/mirrorselect.8 b/mirrorselect.8
index 8f0f56e..49caadd 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -44,6 +44,9 @@ ftp only mode. Will not consider hosts of other types.
 .B \-H, \-\-http
 http only mode. Will not consider hosts of other types.
 .TP
+.B \-S, \-\-https
+https only mode. Will not consider hosts of other types.
+.TP
 .B \-r, \-\-rsync
 rsync mode. Allows you to interactively select your rsync mirror.
  Requires -i to be used.

diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py
index dca8302..19dc059 100644
--- a/mirrorselect/extractor.py
+++ b/mirrorselect/extractor.py
@@ -50,7 +50,7 @@ class Extractor(object):
 				filters[opt] = value
 				self.output.print_info('Limiting test to "%s=%s" hosts. \n'
 					%(opt, value))
-		for opt in ["ftp", "http"]:
+		for opt in ["ftp", "http", "https"]:
 			if getattr(options, opt):
 				filters["proto"] = opt
 				self.output.print_info('Limiting test to %s hosts. \n' % opt )

diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index c3b5633..b0a68cc 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -181,6 +181,9 @@ class MirrorSelect(object):
 		group.add_option(
 			"-H", "--http", action="store_true", default=False,
 			help="http only mode. Will not consider hosts of other types")
+		group.add_option(
+			"-S", "--https", action="store_true", default=False,
+			help="https only mode. Will not consider hosts of other types")
 		group.add_option(
 			"-r", "--rsync", action="store_true", default=False,
 			help="rsync mode. Allows you to interactively select your"
@@ -255,8 +258,8 @@ class MirrorSelect(object):
 		# sanity checks
 
 		# hack: check if more than one of these is set
-		if options.http + options.ftp + options.rsync > 1:
-			self.output.print_err('Choose at most one of -H, -f and -r')
+		if options.http + options.https + options.ftp + options.rsync > 1:
+			self.output.print_err('Choose at most one of -H, -S, -f and -r')
 
 		if options.ipv4 and options.ipv6:
 			self.output.print_err('Choose at most one of --ipv4 and --ipv6')


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-30 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-27 18:08 [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2022-05-30 23:12 Brian Dolbec
2019-07-17  5:09 Zac Medico
2018-05-26 15:43 Brian Dolbec
2014-01-31 15:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
2014-03-02  7:44 ` [gentoo-commits] proj/mirrorselect:master " Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox