From 13e5db0637204b9164ed5cab4cef129505548407 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 7 Feb 2023 17:30:13 +0100 Subject: Python 2.x -> 3.x conversion --- scripts/statics-compile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/statics-compile.py') diff --git a/scripts/statics-compile.py b/scripts/statics-compile.py index 16d82ae..dc2f53a 100644 --- a/scripts/statics-compile.py +++ b/scripts/statics-compile.py @@ -15,7 +15,7 @@ while True: if len(arguments) == 0: break -template = bs4(file('templates/static.html'), 'lxml') +template = bs4(open('templates/static.html'), 'lxml') content_wrapper = template.find('div', {'id': 'wrapper'}).extract() del content_wrapper['id'] @@ -27,8 +27,8 @@ footer = template.find('div', {'id': 'footer'}) for content_file in content_files: content = copy.copy(content_wrapper) content.div.append( - bs4(file(content_file).read(), 'html.parser') + bs4(open(content_file).read(), 'html.parser') ) footer.insert_before(content) -print template.prettify().encode('utf-8') +print(template.prettify()) -- cgit v1.2.3