diff options
author | Eric Wong <e@80x24.org> | 2021-09-27 04:59:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-27 09:22:47 +0000 |
commit | c5b8b0cbc72b8133c70d68668047219342e886d1 (patch) | |
tree | 4483d58abb2255a3c8c973f6038c3f87260526b3 /lib/PublicInbox/LeiRediff.pm | |
parent | 840c1c80ccd3000a8ed888851a86a096e514002c (diff) | |
download | public-inbox-c5b8b0cbc72b8133c70d68668047219342e886d1.tar.gz |
lei rediff is expected to see partial patch fragments and such, so silence warnings when something isn't exactly a valid email message.
Diffstat (limited to 'lib/PublicInbox/LeiRediff.pm')
-rw-r--r-- | lib/PublicInbox/LeiRediff.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiRediff.pm b/lib/PublicInbox/LeiRediff.pm index ea9b2a64..f6960560 100644 --- a/lib/PublicInbox/LeiRediff.pm +++ b/lib/PublicInbox/LeiRediff.pm @@ -193,8 +193,15 @@ sub extract_oids { # Eml each_part callback sub input_eml_cb { # callback for all emails my ($self, $eml) = @_; - $self->{tmp_sto}->add_eml($eml); - $self->{tmp_sto}->done; + { + local $SIG{__WARN__} = sub { + return if "@_" =~ /^no email in From: .*? or Sender:/; + return if PublicInbox::Eml::warn_ignore(@_); + warn @_; + }; + $self->{tmp_sto}->add_eml($eml); + $self->{tmp_sto}->done; + } $eml->each_part(\&extract_oids, $self, 1); } |