Skip to content

Fix bare except clause in docs/jsonrpc-example-code/jsonrpc.py#493

Open
koteshyelamati wants to merge 1 commit into
Pylons:mainfrom
koteshyelamati:main
Open

Fix bare except clause in docs/jsonrpc-example-code/jsonrpc.py#493
koteshyelamati wants to merge 1 commit into
Pylons:mainfrom
koteshyelamati:main

Conversation

@koteshyelamati

Copy link
Copy Markdown

Replace bare except: with except Exception: in the JSON-RPC example.

The bare except: is used to catch any error from method(*params) and format a JSON-RPC error response. Using except Exception: is more appropriate — it covers all standard errors while allowing SystemExit and KeyboardInterrupt to propagate normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant