From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 070EF3858D33; Sun, 20 Nov 2022 21:34:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 070EF3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668980053; bh=NSOEBLnxXAFHNKny7XKIbJXmsjwJMSZhiaQPs9zWz2Y=; h=To:Subject:Date:From:From; b=lRolV27c9K5fP9rnIVU9dRek3dADp6aE3Idiy3ctFtFuCfx8B4lwiPB4XsZL7Hj9R ZFav27TtlLPC5PDJOAK4GJ68YysiZNHIciRqDlN4cBg+RbyYEVGfHldtOigVYXm/Kx B/2X9kf4Z+/YqYVowYv07JqroLvTnDwVQk91IsII= To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-27-g6087edd X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 175aeb644de5e9271394d56176ba2de8cec2f082 X-Git-Newrev: 6087edd6a7097ec102f3a15647beda0099e3ebdf Message-Id: <20221120213413.070EF3858D33@sourceware.org> Date: Sun, 20 Nov 2022 21:34:12 +0000 (GMT) From: Jon TURNEY List-Id: https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=6087edd6a7097ec102f3a15647beda0099e3ebdf commit 6087edd6a7097ec102f3a15647beda0099e3ebdf Author: Jon Turney 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 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']