Fix calculations of :bytes, :lines in OVER
This commit is contained in:
parent
a3c38161c9
commit
1e0ea5ea07
1 changed files with 5 additions and 2 deletions
|
@ -646,6 +646,9 @@ class Session(Connection):
|
|||
def f(s: str):
|
||||
return s.replace('\t', ' ').replace('\r', '').replace('\n', ' ').replace('\0', '')
|
||||
|
||||
int_bytes = len(bytes(message.content, 'utf-8'))
|
||||
int_lines = message.body.count('\n') - 2
|
||||
|
||||
parts = [
|
||||
str(message.id),
|
||||
email.header.Header(message.subject).encode(),
|
||||
|
@ -653,8 +656,8 @@ class Session(Connection):
|
|||
email.utils.format_datetime(message.created_on),
|
||||
message.message_id,
|
||||
message.reference_ids or '',
|
||||
str(len(message.content)),
|
||||
str(message.content.count('\n') + 1),
|
||||
str(int_bytes),
|
||||
str(int_lines),
|
||||
]
|
||||
|
||||
HEADERS_SKIP = {
|
||||
|
|
Loading…
Add table
Reference in a new issue