Exceptions - libvcs.exc¶

Exceptions for libvcs.

exception libvcs.exc.LibVCSException
¶
exception[source]

Bases: Exception

Standard exception raised by libvcs.

exception libvcs.exc.CommandError
¶
exception[source]

Bases: LibVCSException

Raised on non-zero return codes.

exception libvcs.exc.CommandTimeoutError
¶
exception[source]

Bases: CommandError

CommandError raised when a subprocess exceeds its wall-clock timeout.

Carries the deadline used when the timeout fired so callers and human readers see the duration in the rendered message rather than the misleading "Command failed with code None: ..." produced by the bare CommandError template (the child is not necessarily reaped before the exception is raised, leaving returncode None).

Examples

>>> err = CommandTimeoutError(
...     output='partial output',
...     cmd='git fetch',
...     timeout=2.5,
... )
>>> print(str(err))
Command timed out after 2.5s: git fetch
partial output
exception libvcs.exc.InvalidVCS
¶
exception[source]

Bases: LibVCSException

Invalid VCS.