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/menus-write.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/menus-write.py') diff --git a/scripts/menus-write.py b/scripts/menus-write.py index e30c702..0a4f1a7 100644 --- a/scripts/menus-write.py +++ b/scripts/menus-write.py @@ -3,12 +3,12 @@ import copy, json, os, sys from bs4 import BeautifulSoup as bs4 content_file = sys.argv[1] -menu_content = file(sys.argv[2]) +menu_content = open(sys.argv[2]) -content = bs4(file(content_file), 'lxml') +content = bs4(open(content_file), 'lxml') for menu_container in content.select('.static-menu'): menu_container.clear() menu_container.append(bs4(menu_content, 'html.parser')) -file(content_file, 'w').write(content.prettify().encode('utf-8')) +open(content_file, 'w').write(content.prettify()) -- cgit v1.2.3