From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/
Date: Mon, 7 Aug 2023 00:14:20 +0000 (UTC) [thread overview]
Message-ID: <1691367148.816c1882de41dcf4a2fc65e455f95f8d8197883e.sam@gentoo> (raw)
commit: 816c1882de41dcf4a2fc65e455f95f8d8197883e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 7 00:09:58 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 7 00:12:28 2023 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=816c1882
Run `autopep8`
Signed-off-by: Sam James <sam <AT> gentoo.org>
mirrorselect/mirrorparser3.py | 4 +++-
mirrorselect/selectors.py | 17 ++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/mirrorselect/mirrorparser3.py b/mirrorselect/mirrorparser3.py
index 37245ff..3e32880 100644
--- a/mirrorselect/mirrorparser3.py
+++ b/mirrorselect/mirrorparser3.py
@@ -86,7 +86,9 @@ class MirrorParser3:
if __name__ == "__main__":
import sys
- import urllib.request, urllib.parse, urllib.error
+ import urllib.request
+ import urllib.parse
+ import urllib.error
parser = MirrorParser3()
parser.parse(urllib.request.urlopen(MIRRORS_3_XML).read())
diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py
index 4ec4474..60956d4 100644
--- a/mirrorselect/selectors.py
+++ b/mirrorselect/selectors.py
@@ -27,6 +27,8 @@ Distributed under the terms of the GNU General Public License v2
"""
+from mirrorselect.output import encoder, get_encoding, decode_selection
+import http.client
import math
import signal
import socket
@@ -36,16 +38,15 @@ import sys
import time
import hashlib
-import urllib.request, urllib.parse, urllib.error
+import urllib.request
+import urllib.parse
+import urllib.error
url_parse = urllib.parse.urlparse
url_unparse = urllib.parse.urlunparse
url_open = urllib.request.urlopen
url_request = urllib.request.Request
HTTPError = urllib.error.HTTPError
-import http.client
-
-from mirrorselect.output import encoder, get_encoding, decode_selection
# The netselect --ipv4 and --ipv6 options are supported only
@@ -251,7 +252,6 @@ class Deep:
self.dl_failures = 0
for host in hosts:
-
prog += 1
if self.test_file != "mirrorselect-test":
self.output.print_info(
@@ -289,7 +289,7 @@ class Deep:
rethosts = []
for key in keys:
# self.output.write('deeptest(): adding rethost '
- #'%s, %s' % (key, top_hosts[key]), 2)
+ # '%s, %s' % (key, top_hosts[key]), 2)
rethosts.append(top_hosts[key])
self.output.write("deeptest(): final rethost %s\n" % (rethosts), 2)
@@ -514,7 +514,6 @@ class Deep:
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]),
@@ -609,7 +608,7 @@ class Interactive:
dialog.extend(["20", "110", "14"])
- for (url, args) in sorted(
+ for url, args in sorted(
hosts, key=lambda x: (x[1]["country"].lower(), x[1]["name"].lower())
):
marker = ""
@@ -623,7 +622,7 @@ class Interactive:
continue
# dialog.append('"%s" "%s%s: %s" "OFF"'
- #% ( url, marker, args['country'], args['name']))
+ # % ( url, marker, args['country'], args['name']))
dialog.extend(
[
"%s" % url,
next reply other threads:[~2023-08-07 0:14 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 0:14 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-28 3:48 [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/ Sam James
2023-08-07 0:23 Sam James
2023-08-07 0:14 Sam James
2023-08-07 0:14 Sam James
2023-08-06 23:30 Sam James
2023-08-06 23:30 Sam James
2023-07-06 8:05 Sam James
2022-05-31 18:39 Brian Dolbec
2022-05-31 18:39 Brian Dolbec
2022-05-31 18:39 Brian Dolbec
2022-05-31 18:39 Brian Dolbec
2022-05-31 4:08 Brian Dolbec
2022-05-31 4:08 Brian Dolbec
2022-05-31 2:22 Brian Dolbec
2022-05-31 2:22 Brian Dolbec
2022-05-30 23:12 Brian Dolbec
2022-05-30 23:12 Brian Dolbec
2020-06-03 19:05 Brian Dolbec
2019-07-17 5:06 Zac Medico
2019-05-27 17:52 Zac Medico
2019-05-27 17:22 Zac Medico
2019-02-13 8:22 Zac Medico
2019-02-13 8:09 Zac Medico
2019-02-13 5:51 Zac Medico
2018-05-26 15:43 Brian Dolbec
2017-02-21 4:44 Zac Medico
2017-02-21 3:19 Brian Dolbec
2017-02-21 3:19 Brian Dolbec
2016-11-15 1:16 Zac Medico
2015-01-27 18:20 Brian Dolbec
2015-01-27 4:38 Brian Dolbec
2015-01-27 4:38 Brian Dolbec
2014-05-28 21:08 Brian Dolbec
2014-05-28 19:44 Brian Dolbec
2014-05-05 2:04 Brian Dolbec
2014-05-05 2:04 Brian Dolbec
2014-05-05 2:04 Brian Dolbec
2014-03-02 7:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
2014-03-02 7:44 ` [gentoo-commits] proj/mirrorselect:master " Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 Brian Dolbec
2014-03-02 7:44 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
2013-10-20 18:19 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
2014-03-02 7:44 ` [gentoo-commits] proj/mirrorselect:master " Brian Dolbec
2013-10-19 9:06 Brian Dolbec
2013-10-19 9:06 Brian Dolbec
2013-10-19 9:06 Brian Dolbec
2013-10-18 14:26 Brian Dolbec
2013-10-18 6:46 Brian Dolbec
2013-10-18 6:46 Brian Dolbec
2013-10-18 6:46 Brian Dolbec
2013-10-18 6:46 Brian Dolbec
2013-10-17 14:26 Brian Dolbec
2013-10-17 6:57 Brian Dolbec
2013-10-17 3:16 Brian Dolbec
2013-10-17 3:16 Brian Dolbec
2013-10-17 3:16 Brian Dolbec
2013-10-16 9:17 Brian Dolbec
2013-10-16 8:36 Brian Dolbec
2013-10-16 8:36 Brian Dolbec
2013-10-16 8:36 Brian Dolbec
2013-10-16 8:36 Brian Dolbec
2013-10-15 22:43 Brian Dolbec
2013-10-15 14:39 Brian Dolbec
2013-10-15 14:39 Brian Dolbec
2013-10-15 14:39 Brian Dolbec
2013-10-15 7:27 Brian Dolbec
2013-10-15 3:51 Brian Dolbec
2013-10-15 3:51 Brian Dolbec
2013-03-10 13:07 Brian Dolbec
2012-12-16 2:38 Brian Dolbec
2012-12-15 21:25 Brian Dolbec
2012-11-15 3:53 Brian Dolbec
2012-11-15 3:44 Brian Dolbec
2012-11-14 20:28 Paul Varner
2012-11-12 21:41 Brian Dolbec
2012-11-12 20:37 Brian Dolbec
2012-11-12 15:56 Brian Dolbec
2012-11-12 7:46 Brian Dolbec
2012-11-12 7:46 Brian Dolbec
2012-11-12 7:46 Brian Dolbec
2012-11-12 7:46 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1691367148.816c1882de41dcf4a2fc65e455f95f8d8197883e.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox