From a81ad9c4b1b5d8c2ae8444b6dcb8710bd361f628 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Thu, 22 Feb 2018 17:55:36 +0000 Subject: import_vger_from_mbox: use PublicInbox::MIME and avoid clobbering It is less confusing without the clobber assignment; and PublicInbox::MIME exists to workaround bugs in older Email::MIME (which is in Debian 9 (stretch)) --- scripts/import_vger_from_mbox | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox index abc2d37c..13084835 100644 --- a/scripts/import_vger_from_mbox +++ b/scripts/import_vger_from_mbox @@ -46,12 +46,12 @@ my $vger = PublicInbox::Filter::Vger->new; sub do_add ($$) { my ($im, $msg) = @_; $$msg =~ s/(\r?\n)+\z/$1/s; - $msg = Email::MIME->new($$msg); - $msg = $vger->scrub($msg); + my $mime = PublicInbox::MIME->new($msg); + $mime = $vger->scrub($mime); return unless $im; - $im->add($msg) or + $im->add($mime) or warn "duplicate: ", - $msg->header_obj->header_raw('Message-ID'), "\n"; + $mime->header_obj->header_raw('Message-ID'), "\n"; } # asctime: From example@example.com Fri Jun 23 02:56:55 2000 -- cgit v1.2.3-24-ge0c7