File: apport_excepthook.py

package info (click to toggle)
python-exceptiongroup 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 264 kB
  • sloc: python: 2,425; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
# The apport_python_hook package is only installed as part of Ubuntu's system
# python, and not available in venvs. So before we can import it we have to
# make sure it's on sys.path.
import sys

sys.path.append("/usr/lib/python3/dist-packages")
import apport_python_hook  # unsorted import

apport_python_hook.install()

from exceptiongroup import ExceptionGroup  # noqa: E402 # unsorted import

raise ExceptionGroup("msg1", [KeyError("msg2"), ValueError("msg3")])