diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-25 23:29:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-25 23:29:22 +0000 |
commit | 176122b963d2cd47509b1901ebf819618a55cf74 (patch) | |
tree | 03cb72ded0054730c35d8eee60dbe268e185d238 | |
parent | 69f4b018c65f8297e7e740f34788008d18e5e233 (diff) | |
download | iurt-176122b963d2cd47509b1901ebf819618a55cf74.tar iurt-176122b963d2cd47509b1901ebf819618a55cf74.tar.gz iurt-176122b963d2cd47509b1901ebf819618a55cf74.tar.bz2 iurt-176122b963d2cd47509b1901ebf819618a55cf74.tar.xz iurt-176122b963d2cd47509b1901ebf819618a55cf74.zip |
(perform_command) do not reinvent max()
-rw-r--r-- | lib/Iurt/Process.pm | 5 |
1 files 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++; |