public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-27-g6087edd Date: Sun, 20 Nov 2022 21:34:12 +0000 (GMT) [thread overview] Message-ID: <20221120213413.070EF3858D33@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=6087edd6a7097ec102f3a15647beda0099e3ebdf commit 6087edd6a7097ec102f3a15647beda0099e3ebdf Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Sun Nov 20 21:32:17 2022 +0000 CI: Drop no longer available python 3.6 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=fc50fe36f4834273b0063caada2aeea6cf200672 commit fc50fe36f4834273b0063caada2aeea6cf200672 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Sun Nov 20 21:24:34 2022 +0000 Avoid an exception when homepage: isn't a URL urllib.request.Request() throws a ValueError when the URL doesn't start with a scheme. e.g. is just a hostname. Diff: --- .github/workflows/calm.yaml | 2 +- calm/fixes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/calm.yaml b/.github/workflows/calm.yaml index 90a532a..3e65dd6 100644 --- a/.github/workflows/calm.yaml +++ b/.github/workflows/calm.yaml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, '3.10'] + python-version: [3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 diff --git a/calm/fixes.py b/calm/fixes.py index f147be2..1f67d13 100644 --- a/calm/fixes.py +++ b/calm/fixes.py @@ -98,8 +98,8 @@ class NoRedirection(urllib.request.HTTPErrorProcessor): def follow_redirect(homepage): opener = urllib.request.build_opener(NoRedirection) opener.addheaders = [('User-Agent', 'calm')] - request = urllib.request.Request(homepage, method='HEAD') try: + request = urllib.request.Request(homepage, method='HEAD') response = opener.open(request, timeout=60) if response.code in [301, 308]: return response.headers['Location']
reply other threads:[~2022-11-20 21:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221120213413.070EF3858D33@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).