From 176122b963d2cd47509b1901ebf819618a55cf74 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 25 Mar 2012 23:29:22 +0000 Subject: (perform_command) do not reinvent max() --- lib/Iurt/Process.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 2a8e90e..d2e0924 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -3,7 +3,7 @@ package Iurt::Process; use strict; use base qw(Exporter); use List::MoreUtils qw(any); -use MDK::Common qw(cat_); +use MDK::Common qw(cat_ max); use Filesys::Df qw(df); use Iurt::Mail qw(sendmail); use Iurt::Config qw(dump_cache_par); @@ -250,8 +250,7 @@ sub perform_command { my $call_ret = 1; my ($err, $pid, $try); my $logfile = "$opt{log}/$opt{logname}.$run->{run}.log"; - my $max_retry = $config->{max_command_retry} < $retry ? - $retry : $config->{max_command_retry}; + my $max_retry = max($config->{max_command_retry}, $retry); while ($retry) { $try++; -- cgit v1.2.1