You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2015/04/02 18:58:30 UTC

svn commit: r1670939 - /spamassassin/trunk/sa-learn.raw

Author: kmcgrail
Date: Thu Apr  2 16:58:30 2015
New Revision: 1670939

URL: http://svn.apache.org/r1670939
Log:
sa-learn quiet option bug 7161

Modified:
    spamassassin/trunk/sa-learn.raw

Modified: spamassassin/trunk/sa-learn.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-learn.raw?rev=1670939&r1=1670938&r2=1670939&view=diff
==============================================================================
--- spamassassin/trunk/sa-learn.raw (original)
+++ spamassassin/trunk/sa-learn.raw Thu Apr  2 16:58:30 2015
@@ -80,6 +80,7 @@ $SIG{PIPE} = 'IGNORE';
   'force-expire' => 0,
   'use-ignores'  => 0,
   'nosync'       => 0,
+  'quiet'        => 0,
   'cf'           => []
 );
 
@@ -95,6 +96,7 @@ GetOptions(
   'sync'        => \$synconly,
   'rebuild'     => sub { $synconly = 1; warn "The --rebuild option has been deprecated.  Please use --sync instead.\n" },
 
+  'q|quiet'     => \$opt{'quiet'},
   'username|u=s'    => \$opt{'username'},
   'configpath|config-file|config-dir|c|C=s' => \$opt{'configpath'},
   'prefspath|prefs-file|p=s'                => \$opt{'prefspath'},
@@ -356,7 +358,7 @@ $spamtest->{bayes_scanner}{use_ignores}
 if ($synconly) {
   $spamtest->rebuild_learner_caches(
     {
-      verbose  => 1,
+      verbose  => !$opt{'quiet'},
       showdots => $opt{'showdots'}
     }
   );
@@ -480,7 +482,8 @@ eval {
   $progress->final() if ($opt{progress} && $progress);
 
   my $phrase = defined $forget ? "Forgot" : "Learned";
-  print "$phrase tokens from $learnedcount message(s) ($messagecount message(s) examined)\n";
+  print "$phrase tokens from $learnedcount message(s) ($messagecount message(s) examined)\n"
+    if !$opt{'quiet'};
 
   # If we needed to make a tempfile, go delete it.
   if (defined $tempfile) {