Skip to content
Snippets Groups Projects
Unverified Commit b6a7d49b authored by Eric Eastwood's avatar Eric Eastwood Committed by GitHub
Browse files

`traceback.format_exception(...)` usage that is compatible with Python 3.7 and 3.11 (#15599)

* Usage that is compatible with Python 3.8 and 3.11

> Since Python 3.10, instead of passing value and tb, an exception object can
  be passed as the first argument. If value and tb are provided, the first
  argument is ignored in order to provide backwards compatibility.
>
> -- https://docs.python.org/3/library/traceback.html

* Add changelog
parent 0ccfb931
No related branches found
No related tags found
No related merge requests found
Print full error and stack-trace of any exception that occurs during startup/initialization.
......@@ -214,7 +214,7 @@ def handle_startup_exception(e: Exception) -> NoReturn:
# the reactor are written to the logs, followed by a summary to stderr.
logger.exception("Exception during startup")
error_string = "".join(traceback.format_exception(e))
error_string = "".join(traceback.format_exception(type(e), e, e.__traceback__))
indented_error_string = indent(error_string, " ")
quit_with_error(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment