Skip to content

Commit

Permalink
Fix the page module importing
Browse files Browse the repository at this point in the history
  • Loading branch information
woodcoder committed Apr 27, 2024
1 parent 3eb8021 commit f18ea41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

page_buttons = import_pages('buttons')

bindings = { p:p.buttons for p in page_buttons }
bindings = { p:m.buttons for p, m in page_buttons.items() }
bindings['help_menu'] = {
'single': {
'L': state.app.close_menu,
Expand Down
2 changes: 1 addition & 1 deletion ui/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def import_pages(module):
'system_menu',
'language'
])
return { p:__import__(f'.{p}.{module}') for p in pages }
return { p:__import__(f'{p}.{module}', globals(), fromlist=[None], level=1) for p in pages }

0 comments on commit f18ea41

Please sign in to comment.