Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit 270a72d

Browse files
Explicitly assign the default bottle app
If we assign `None` to `app` explicitly, then `dict.get()` returns None, not the default value passed to the method. Oops. Let's explicitly assign Bottle's default app to our starting arguments.
1 parent 773d629 commit 270a72d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eel/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'app_mode': True, # (Chrome specific option)
4141
'all_interfaces': False, # Allow bottle server to listen for connections on all interfaces
4242
'disable_cache': True, # Sets the no-store response header when serving assets
43-
'app': None, # Allows passing in a custom Bottle instance, e.g. with middleware
43+
'app': btl.default_app(), # Allows passing in a custom Bottle instance, e.g. with middleware
4444
}
4545

4646
# == Temporary (suppressable) error message to inform users of breaking API change for v1.0.0 ===
@@ -139,7 +139,7 @@ def run_lambda():
139139
else:
140140
HOST = _start_args['host']
141141

142-
app = _start_args.get('app', btl.default_app) # type: btl.Bottle
142+
app = _start_args.get('app') # type: btl.Bottle
143143
for route_path, route_params in BOTTLE_ROUTES.items():
144144
route_func, route_kwargs = route_params
145145
app.route(path=route_path, callback=route_func, **route_kwargs)

0 commit comments

Comments
 (0)