[freeside-commits] freeside/FS/FS/part_export shellcommands.pm, 1.57.4.5, 1.57.4.6

Ivan,,, ivan at wavetail.420.am
Sat Feb 11 17:22:48 PST 2012


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv4141

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	shellcommands.pm 
Log Message:
apply shellcommands ignored_errors regexen to STDOUT as well as STDERR, RT#15347

Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.57.4.5
retrieving revision 1.57.4.6
diff -u -w -d -r1.57.4.5 -r1.57.4.6
--- shellcommands.pm	29 Jan 2012 06:15:22 -0000	1.57.4.5
+++ shellcommands.pm	12 Feb 2012 01:22:44 -0000	1.57.4.6
@@ -498,13 +498,18 @@
   return if $opt->{'ignore_all_output'};
   die "Error running SSH command: ". $ssh->error if $ssh->error;
 
-  if ($errput && $opt->{'ignored_errors'} && length($opt->{'ignored_errors'})) {
+  if ( ($output || $errput)
+       && $opt->{'ignored_errors'} && length($opt->{'ignored_errors'})
+  ) {
     my @ignored_errors = split('\n',$opt->{'ignored_errors'});
     foreach my $ignored_error ( @ignored_errors ) {
+        $output =~ s/$ignored_error//g;
         $errput =~ s/$ignored_error//g;
     }
+    chomp($output);
     chomp($errput);
   }
+
   die $errput if $errput;
   die $output if $output;
   '';



More information about the freeside-commits mailing list