From 6613bb8523693fe50180217794ac27ba9dead333 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Fri, 17 Jan 2025 14:09:30 +0100 Subject: [PATCH 1/3] commands.extract.extractors.msg:msg_attachment - ignore MeetingRelated attachment types --- digiarch/commands/extract/extractors/extractor_msg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digiarch/commands/extract/extractors/extractor_msg.py b/digiarch/commands/extract/extractors/extractor_msg.py index e5d0f981..96cdd953 100644 --- a/digiarch/commands/extract/extractors/extractor_msg.py +++ b/digiarch/commands/extract/extractors/extractor_msg.py @@ -12,6 +12,7 @@ from extract_msg import openMsg from extract_msg import SignedAttachment from extract_msg.exceptions import ExMsgBaseException +from extract_msg.msg_classes import MeetingRelated from extract_msg.msg_classes import MessageSigned from digiarch.common import sanitize_filename @@ -72,7 +73,7 @@ def msg_attachment(attachment: AttachmentBase) -> Message | bool | None: try: if not attachment.data: return None - elif isinstance(attachment.data, (Message, MessageSigned)): + elif isinstance(attachment.data, (Message, MessageSigned, MeetingRelated)): attachment_msg = attachment.data elif isinstance(attachment.data, bytes): attachment_msg = openMsg(attachment.data, delayAttachments=True) From d58460ce22c02cdeebc50bcd5a450904ec97a19f Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Fri, 17 Jan 2025 14:11:54 +0100 Subject: [PATCH 2/3] changelog:5.2.1 - add fixes --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d599e6..9bc73d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v5.2.1 + +### Fixes + +* Ignore meeting-related attachments when extracting MSG files instead of raising a `TypeError` + ## v5.2.0 ### New Features From 7f4e954a13732527c45d6ea31f243031e20b4953 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Fri, 17 Jan 2025 14:12:34 +0100 Subject: [PATCH 3/3] version - patch 5.2.0 > 5.2.1 --- digiarch/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/digiarch/__version__.py b/digiarch/__version__.py index 6c235c59..98886d26 100644 --- a/digiarch/__version__.py +++ b/digiarch/__version__.py @@ -1 +1 @@ -__version__ = "5.2.0" +__version__ = "5.2.1" diff --git a/pyproject.toml b/pyproject.toml index 318ea340..6a45dcd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "digiarch" -version = "5.2.0" +version = "5.2.1" description = "Tools for the Digital Archive Project at Aarhus Stadsarkiv" authors = ["Aarhus Stadsarkiv "] license = "GPL-3.0"