Skip to content

Commit

Permalink
apply RADIOPADRE_SETTINGS only after all modules are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
o-smirnov committed Sep 23, 2023
1 parent 7d1d96b commit 5d8be5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions radiopadre/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,5 @@ def copy_current_notebook(oldpath, newpath, cell=0, copy_dirs='dirs', copy_root=
from .table import tabulate
from .render import render_table, render_preamble, render_refresh_button, render_status_message, rich_string, render_url, render_title

# update settings
settings.finalize_settings()
1 change: 1 addition & 0 deletions radiopadre/settings_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def __init__(self, name="settings"):
html.width = 1920, D("default width of HTML canvas")
html.height = 1024, D("default height of HTML canvas")

def finalize_settings(self):
# check extra settings
env_settings = os.environ.get("RADIOPADRE_SETTINGS")
if env_settings:
Expand Down

0 comments on commit 5d8be5b

Please sign in to comment.