File: errorlist.py

package info (click to toggle)
borgbackup 1.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,688 kB
  • sloc: ansic: 47,269; python: 25,040; pascal: 2,896; makefile: 142; sh: 110; tcl: 94
file content (14 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python3

from textwrap import indent

import borg.archiver  # noqa: F401 - need import to get Error and ErrorWithTraceback subclasses.
from borg.helpers import Error, ErrorWithTraceback

classes = Error.__subclasses__() + ErrorWithTraceback.__subclasses__()

for cls in sorted(classes, key=lambda cls: (cls.__module__, cls.__qualname__)):
    if cls is ErrorWithTraceback:
        continue
    print('   ', cls.__qualname__)
    print(indent(cls.__doc__, ' ' * 8))