extract_msg.attachments.broken_att Module

Module contents

class extract_msg.attachments.broken_att.BrokenAttachment(msg: MSGFile, dir_: str, propStore: PropertiesStore)[source]

Bases: AttachmentBase

An attachment that has suffered a fatal error.

Will not generate from a NotImplementedError exception.

Parameters:
  • msg – the Message instance that the attachment belongs to.

  • dir – the directory inside the MSG file where the attachment is located.

  • propStore – The PropertiesStore instance for the attachment.

getFilename(**_) str[source]

Returns the filename to use for the attachment.

Parameters:
  • contentId – Use the contentId, if available.

  • customFilename – A custom name to use for the file.

If the filename starts with “UnknownFilename” then there is no guarantee that the files will have exactly the same filename.

save(**kwargs) Tuple[SaveType, List[str] | str | None][source]

Raises a NotImplementedError unless :param skipNotImplemented: is set to True.

If it is, returns a value that indicates no data was saved.

property data: None

Broken attachments have no data.

property type: AttachmentType

An enum value that identifies the type of attachment.