onyo.lib.exceptions module

exception onyo.lib.exceptions.InvalidArgumentError[source]

Bases: Exception

Raise if a (CLI-) command is invalidly called beyond what’s covered by argparse.

exception onyo.lib.exceptions.InvalidAssetError[source]

Bases: Exception

Raise if an asset is invalid.

exception onyo.lib.exceptions.InvalidInventoryOperationError[source]

Bases: InventoryOperationError

Raise if an invalid inventory operation is requested.

exception onyo.lib.exceptions.InventoryDirNotEmpty[source]

Bases: InvalidInventoryOperationError

Raise if an inventory directory is not empty but needs to be in order to perform an operation.

exception onyo.lib.exceptions.InventoryOperationError[source]

Bases: Exception

Raise if an inventory operation cannot be executed.

exception onyo.lib.exceptions.NoopError[source]

Bases: InventoryOperationError

Raise if a requested operation is a no-op.

Signal that an inventory operation would not result in a change, allowing callers to determine the failure paradigm: state (already-fine; success) vs task (can’t-do; failure).

exception onyo.lib.exceptions.NotADirError[source]

Bases: Exception

Raise if an object is expected to be a directory but is not.

exception onyo.lib.exceptions.NotAnAssetError[source]

Bases: Exception

Raise if an object is expected to be an asset but is not.

exception onyo.lib.exceptions.OnyoCLIExitCode(message, returncode)[source]

Bases: Exception

Raise if the Onyo CLI should exit with a specific value.

__init__(message, returncode)[source]

Instantiate an OnyoCLIExitCode with a message and exit code.

Parameters:
  • message (str) – The exception message

  • returncode (int) – The code to exit the command as.

exception onyo.lib.exceptions.OnyoInvalidFilterError[source]

Bases: Exception

Raise if filters are invalidly defined.

exception onyo.lib.exceptions.OnyoInvalidRepoError[source]

Bases: OnyoRepoError

Raise if the repository is invalid.

exception onyo.lib.exceptions.OnyoProtectedPathError[source]

Bases: Exception

Raise if path is protected.

For example: .git/, onyo.lib.consts.ANCHOR_FILE_NAME, onyo.lib.consts.ONYO_DIR, etc.

exception onyo.lib.exceptions.OnyoRepoError[source]

Bases: Exception

Raise if something is wrong with an Onyo repository.

exception onyo.lib.exceptions.PendingInventoryOperationError[source]

Bases: InventoryOperationError

Raise if there are unexpected pending operations.

exception onyo.lib.exceptions.UIInputError[source]

Bases: Exception

Raise if UI failed when trying to read input.