Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 17, 2024
1 parent 4e4a141 commit 2e9c3de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions panel/command/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,19 +570,19 @@ def setup_file():
try:
with add_sys_path('./'):
plugin_module = importlib.import_module(plugin)
except ModuleNotFoundError:
except ModuleNotFoundError as e:
raise Exception(
f'Specified plugin module {plugin!r} could not be found. '
'Ensure the module exists and is in the right path. '
)
) from e
try:
routes = getattr(plugin_module, 'ROUTES')
except AttributeError:
routes = plugin_module.ROUTES
except AttributeError as e:
raise Exception(
f'The plugin module {plugin!r} does not declare '
'a ROUTES variable. Ensure that the module provides '
'a list of ROUTES to serve.'
)
) from e
patterns.extend(routes)

if args.oauth_provider:
Expand Down

0 comments on commit 2e9c3de

Please sign in to comment.