Exceptions

Bundle read/write exceptions

exception momotor.bundles.BundleError

Base class for all exceptions raised by the bundles module.

exception momotor.bundles.BundleHashError

Raised when a bundle attachment hash does not match the attachment content.

This is a subclass of BundleError.

exception momotor.bundles.BundleFormatError

Raised when a bundle is not valid.

This is a subclass of BundleError.

exception momotor.bundles.InvalidRefError

Raised when a ref attribute is invalid.

This is a subclass of BundleFormatError.

exception momotor.bundles.InvalidBundle

Raised when a bundle is invalid.

This is a subclass of BundleFormatError.

exception momotor.bundles.LxmlMissingError

Raised when lxml is requested but not installed.

This is a subclass of BundleError.

exception momotor.bundles.BundleLoadError

Raised when a bundle cannot be loaded.

This is a subclass of BundleError.

Internal exceptions

exception momotor.bundles.elements.content.AttachmentContent

Raised when the content is in an attachment.

Subclass of ValueError. This exception is raised when trying to access the value property of an element that has content stored in an external attachment (via the src attribute) rather than inline content.

exception momotor.bundles.elements.content.NoContent

Raised when no content was provided.

Subclass of ValueError. This exception is raised when trying to access the value property of an element that has no content set.

exception momotor.bundles.elements.files.FileIntegrityError

Raised when an attachment fails hash verification

exception momotor.bundles.mixins.attachments.ZippedAttachment

Raised when trying to access a file using a filesystem path in a zipped bundle.

This exception occurs when attempting to get the absolute path of an attachment that exists within a ZIP file, since ZIP contents don’t have direct filesystem paths.

exception momotor.bundles.parsers.handlers.exceptions.ValidationError

Raised when an XML validation error occurs

This internal exception in converted to a BundleFormatError before being thrown to the caller