Skip to content

Commit

Permalink
Fix BytesHeaderParser parse bytes again
Browse files Browse the repository at this point in the history
  • Loading branch information
M3te0r committed May 5, 2022
1 parent fe6dfe0 commit d09c479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ikaaro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@


# The version
__version__ = "0.80.2"
__version__ = "0.80.5"
__version_info__ = tuple(
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
Expand Down
6 changes: 3 additions & 3 deletions ikaaro/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Import from the Standard Library
#from cProfile import runctx
from email.parser import HeaderParser
from email.parser import BytesHeaderParser
from json import loads
from io import BytesIO
from datetime import timedelta
Expand Down Expand Up @@ -796,8 +796,8 @@ def get_names():

# 3. Send message
try:
message = spool.open(name, mode="r", text=True).read()
headers = HeaderParser().parsestr(message)
message = spool.open(name).read()
headers = BytesHeaderParser().parsebytes(message)
subject = headers['subject']
from_addr = headers['from']
to_addr = headers['to']
Expand Down
2 changes: 1 addition & 1 deletion setup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ url = "http://www.hforge.org/ikaaro"
author_name = "J. David Ibáñez"
author_email = "[email protected]"
license = "GNU General Public License (GPL)"
version=0.80.2
version=0.80.5

# Longer description
description = "A Content Management System built on Python & itools"
Expand Down

0 comments on commit d09c479

Please sign in to comment.