hyperkitty_import aborts when message.replace_header fails (1.3.3)
It should report the id of the mail and skip it instead of aborting as shown in the example below.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/debian/venv-hyperkitty/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/debian/venv-hyperkitty/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/debian/venv-hyperkitty/lib/python3.7/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/debian/venv-hyperkitty/lib/python3.7/site-packages/django/core/management/base.py", line 369, in execute
output = self.handle(*args, **options)
File "/home/debian/hyperkitty/hyperkitty/management/commands/hyperkitty_import.py", line 333, in handle
importer.from_mbox(mbfile)
File "/home/debian/hyperkitty/hyperkitty/management/commands/hyperkitty_import.py", line 189, in from_mbox
"subject", TEXTWRAP_RE.sub(" ", message["subject"]))
File "/usr/lib/python3.7/email/message.py", line 555, in replace_header
self._headers[i] = self.policy.header_store_parse(k, _value)
File "/usr/lib/python3.7/email/policy.py", line 145, in header_store_parse
raise ValueError("Header values may not contain linefeed "
ValueError: Header values may not contain linefeed or carriage return characters