summaryrefslogtreecommitdiff
path: root/email-print-mime-structure
diff options
context:
space:
mode:
Diffstat (limited to 'email-print-mime-structure')
-rwxr-xr-xemail-print-mime-structure1
1 files changed, 1 insertions, 0 deletions
diff --git a/email-print-mime-structure b/email-print-mime-structure
index 98b35fe..c1476d2 100755
--- a/email-print-mime-structure
+++ b/email-print-mime-structure
@@ -61,6 +61,7 @@ class MimePrinter(object):
payload:Union[List[Message], str, bytes, None] = z.get_payload()
if not isinstance(payload, (str,bytes)):
raise TypeError(f'expected payload to be either str or bytes, got {type(payload)}')
+ # FIXME: it looks like we are counting chars here, not bytes:
nbytes = len(payload)
print(f'{prefix}{z.get_content_type()}{cset}{disposition}{fname} {nbytes:d} bytes')