diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2019-11-02 01:28:22 -0400 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-11-02 08:44:19 -0700 |
commit | d6dc4aaf0d465c3c267b9c8a663011b0b01fadcd (patch) | |
tree | bbdc6bee3ba3c74163c43765b52ec910f95e1997 /email-print-mime-structure | |
parent | 8dd6783b9bf37d0e12b343da6105cd92a5ebef1d (diff) | |
download | mailscripts-d6dc4aaf0d465c3c267b9c8a663011b0b01fadcd.tar.gz |
email-print-mime-structure: add another FIXME about bytecounting
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'email-print-mime-structure')
-rwxr-xr-x | email-print-mime-structure | 1 |
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') |