From aece46bdf0af3dce045797c2e897a0088e4324a5 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 23 Feb 2018 18:33:34 +0000 Subject: use PublicInbox::MIME consistently It works around some bugs in older Email::MIME which we'll find useful. --- scripts/import_slrnspool | 4 ++-- scripts/import_vger_from_mbox | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool index 5158460b..7b6c9ab0 100755 --- a/scripts/import_slrnspool +++ b/scripts/import_slrnspool @@ -11,7 +11,7 @@ use strict; use warnings; use PublicInbox::Config; -use Email::MIME; +use PublicInbox::MIME; use PublicInbox::Import; use PublicInbox::Git; sub usage { "Usage:\n".join('',grep(/\t/, `head -n 10 $0`)) } @@ -58,7 +58,7 @@ for (; $exit == 0 && $n < $max; $n++) { open(my $fh, '<', $fn) or next; $max = $n + $max_gap; - my $mime = Email::MIME->new(eval { local $/; <$fh> }); + my $mime = PublicInbox::MIME->new(eval { local $/; <$fh> }); my $hdr = $mime->header_obj; # gmane rewrites Received headers, which increases spamminess diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox index 13084835..8f0ec7cd 100644 --- a/scripts/import_vger_from_mbox +++ b/scripts/import_vger_from_mbox @@ -5,8 +5,7 @@ use strict; use warnings; use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/; use Date::Parse qw/str2time/; -use Email::MIME; -$Email::MIME::ContentType::STRICT_PARAMS = 0; # user input is imperfect +use PublicInbox::MIME; use PublicInbox::Inbox; use PublicInbox::V2Writable; use PublicInbox::Import; -- cgit v1.2.3-24-ge0c7