File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def wrapper(environ, start_response):
3434 return wrapper
3535
3636
37- def _load_legacy_wsgi (ol_config_file : str ):
37+ def _load_legacy_wsgi ():
3838 """Initialize legacy configuration and side-effects as in scripts/openlibrary-server.
3939
4040 This function does not return a WSGI callable; it is called for its side effects only.
@@ -45,6 +45,9 @@ def _load_legacy_wsgi(ol_config_file: str):
4545 # match scripts/openlibrary-server behavior
4646 from infogami .utils import delegate as _delegate # noqa: F401 - side-effects
4747
48+ ol_config_path = Path (__file__ ).parent / "conf" / "openlibrary.yml"
49+ ol_config_file = os .environ .get ("OL_CONFIG" , str (ol_config_path ))
50+
4851 config .plugin_path += ["openlibrary.plugins" ]
4952 config .site = "openlibrary.org"
5053
@@ -121,11 +124,9 @@ def create_app() -> FastAPI:
121124
122125 pytest .skip ("Skipping in CI" , allow_module_level = True )
123126
124- ol_config_path = Path (__file__ ).parent / "conf" / "openlibrary.yml"
125- ol_config = os .environ .get ("OL_CONFIG" , str (ol_config_path ))
126127 try :
127128 # We still call this even though we don't use it because of the side effects
128- legacy_wsgi = _load_legacy_wsgi (ol_config ) # noqa: F841
129+ _load_legacy_wsgi ()
129130
130131 global sentry
131132 if sentry is not None :
You can’t perform that action at this time.
0 commit comments