diff options
author | emkael <emkael@tlen.pl> | 2023-02-07 17:30:13 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2023-02-07 17:30:13 +0100 |
commit | 13e5db0637204b9164ed5cab4cef129505548407 (patch) | |
tree | 7ff1c97ac01a256c9dc3f4bbc269e06b33096376 /scripts/menus-compile.py | |
parent | 79d084a1222062df47528b8340a83ef679735267 (diff) |
Python 2.x -> 3.x conversion
Diffstat (limited to 'scripts/menus-compile.py')
-rw-r--r-- | scripts/menus-compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |