]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiRediff.pm
lei rediff: quiet warnings from Import and Eml
[public-inbox.git] / lib / PublicInbox / LeiRediff.pm
index ea9b2a643f9a0bb1334bdedca0c899e6840a3f35..f6960560f1a24c850863c7869d27b641a5ac00fd 100644 (file)
@@ -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);
 }