errors

Module with predefined exceptions for use in scripts.

exception lmi.scripts.common.errors.LmiBadSelectExpression(module_name, class_name, expr)[source]

Raised, when expression of LmiSelectCommand could not be evaluated.

exception lmi.scripts.common.errors.LmiCommandError(module_name, class_name, msg)[source]

Generic exception related to command declaration.

exception lmi.scripts.common.errors.LmiCommandImportError(cmd_name, cmd_path, reason)[source]

Exception raised when command can not be imported.

exception lmi.scripts.common.errors.LmiCommandInvalidCallable(module_name, class_name, msg)[source]

Raised, when given callback is not callable.

exception lmi.scripts.common.errors.LmiCommandInvalidName(module_name, class_name, cmd_name)[source]

Raised, when command gets invalid name.

exception lmi.scripts.common.errors.LmiCommandInvalidProperty(module_name, class_name, msg)[source]

Raised, when any command property contains unexpected value.

exception lmi.scripts.common.errors.LmiCommandMissingCallable(module_name, class_name)[source]

Raised, when command declaration is missing callable object.

exception lmi.scripts.common.errors.LmiCommandNotFound(cmd_name)[source]

Raised, when user requests not registered command.

exception lmi.scripts.common.errors.LmiError[source]

The base Lmi scripts error. All the other exceptions inherit from it.

exception lmi.scripts.common.errors.LmiFailed[source]

Raised, when operation on remote host failes. It’s supposed to be used especially in command libraries.

exception lmi.scripts.common.errors.LmiImportCallableFailed(module_name, class_name, callable_prop)[source]

Raised, when callable object of command could not be imported.

exception lmi.scripts.common.errors.LmiInvalidOptions[source]

Raised in verify_options() method if the options given are not valid.

exception lmi.scripts.common.errors.LmiNoConnections[source]

Raised, when no connection to remote hosts could be made.

exception lmi.scripts.common.errors.LmiTerminate(exit_code=0)[source]

Raised to cleanly terminate interavtive shell.

exception lmi.scripts.common.errors.LmiUnexpectedResult(command_class, expected, result)[source]

Raised, when command’s associated function returns something unexpected.

exception lmi.scripts.common.errors.LmiUnsatisfiedDependencies(uris)[source]

Raised when no guarded command in LmiSelectCommand can be loaded due to unsatisfied requirements.