]> 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 60286b065359430a1d6809ac073bea0482433428..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);
 }
 
@@ -255,5 +262,4 @@ sub ipc_atfork_child {
 
 no warnings 'once';
 *net_merge_all_done = \&PublicInbox::LeiInput::input_only_net_merge_all_done;
-*net_merge_all = \&PublicInbox::LeiAuth::net_merge_all;
 1;