From 03f2b5eea99c29c561b4b29227192ae3b50971ff Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Thu, 23 Feb 2023 10:40:14 +0000
Subject: [PATCH] Migrate build.py to Python 3.

---
 build.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/build.py b/build.py
index a89eab7..5737abf 100755
--- a/build.py
+++ b/build.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 import os
 import requests
 
@@ -13,7 +13,7 @@ def checkAtom(file):
 
   r = requests.post(url, data=payload)
 
-  if "This is a valid Atom 1.0 feed" in r.content:
+  if "This is a valid Atom 1.0 feed" in r.content.decode():
     return "checkAtom: " + file + " is valid"
   else:
     return "checkAtom: " + file + " is NOT valid"
@@ -26,7 +26,7 @@ def checkHtml(file):
 
   r = requests.post(url, files=files)
 
-  if "The document validates" in r.content:
+  if "The document validates" in r.content.decode():
     return "checkHtml: " + file + " is valid"
   else:
     return "checkHtml: " + file + " is NOT valid"
@@ -34,6 +34,6 @@ def checkHtml(file):
 if __name__ == "__main__":
   os.system('hugo --cleanDestinationDir')
   atom = checkAtom('public/index.xml')
-  print atom
+  print(atom)
   html = checkHtml('public/index.html')
-  print html
+  print(html)
-- 
GitLab