This commit is contained in:
Son Nguyen Kim 2021-08-20 16:09:22 +02:00
parent 76c1b3d807
commit bae9a6f431
1 changed files with 1 additions and 1 deletions

View File

@ -699,7 +699,7 @@ def copy(msg: Message) -> Message:
"""return a copy of message"""
try:
return deepcopy(msg)
except:
except Exception:
LOG.warning("deepcopy fails, try string parsing")
try:
return email.message_from_string(msg.as_string())