diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 5af9b263..56a70214 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -21,8 +21,6 @@ jobs: - name: 'Download Zola' run: curl -sL https://github.com/getzola/zola/releases/download/v0.12.1/zola-v0.12.1-x86_64-unknown-linux-gnu.tar.gz | tar zxv - - name: "Install Python Tools" - run: python -m pip install --upgrade pip setuptools wheel - name: 'Install Python Libraries' run: python -m pip install --user -r requirements.txt working-directory: "blog" diff --git a/blog/before_build.py b/blog/before_build.py index 08786462..458fed76 100644 --- a/blog/before_build.py +++ b/blog/before_build.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import io -import urllib2 +import urllib import datetime from github import Github @@ -23,7 +23,7 @@ with io.open("templates/auto/recent-updates.html", 'w', encoding='utf8') as rece recent_updates.truncate() relnotes_issues = g.search_issues("is:merged", repo="phil-opp/blog_os", type="pr", label="relnotes")[:100] - recent_relnotes_issues = filter(filter_date, relnotes_issues) + recent_relnotes_issues = list(filter(filter_date, relnotes_issues)) if len(recent_relnotes_issues) == 0: recent_updates.write(u"No notable updates recently.") @@ -58,8 +58,8 @@ month = 4 while True: url = "https://rust-osdev.com/this-month/" + str(year) + "-" + str(month).zfill(2) + "/" try: - urllib2.urlopen(url) - except urllib2.HTTPError as e: + urllib.request.urlopen(url) + except urllib.error.HTTPError as e: break month_str = datetime.date(1900, month, 1).strftime('%B') diff --git a/blog/requirements.txt b/blog/requirements.txt index 4f410941..945b116a 100644 --- a/blog/requirements.txt +++ b/blog/requirements.txt @@ -1,2 +1 @@ PyGithub -urllib2