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-compile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/menus-compile.py') diff --git a/scripts/menus-compile.py b/scripts/menus-compile.py index 7c9fd64..9e96118 100644 --- a/scripts/menus-compile.py +++ b/scripts/menus-compile.py @@ -6,7 +6,7 @@ config_file = sys.argv[1] base_directory = sys.argv[2] menu_directory = sys.argv[3] -for menu_item in json.load(file(config_file)): +for menu_item in json.load(open(config_file)): href = os.path.relpath( os.path.join(base_directory, menu_item['url']), menu_directory @@ -15,4 +15,4 @@ for menu_item in json.load(file(config_file)): link.a['href'] = href link.a['title'] = menu_item['header'] link.a.string = menu_item['label'] - print link.a + print(link.a) -- cgit v1.2.3