diff --git a/build.py b/build.py index a89eab77381f271ed9dd74fcc12084071182f60f..5737abff58f16ac842cf0e8d118846ad68742e18 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)