[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-27-g6087edd

Jon TURNEY jturney@sourceware.org
Sun Nov 20 21:34:12 GMT 2022




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']



More information about the Cygwin-apps-cvs mailing list