From eaa935f2f35dc566d7026165dd62dbf9cd2539a3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Nov 2006 21:11:03 +0000 Subject: use cat_ --- urpm.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 01f389a5..a1ab7295 100644 --- a/urpm.pm +++ b/urpm.pm @@ -450,15 +450,10 @@ sub configure { if ($options{parallel}) { my ($parallel_options, $parallel_handler); #- read parallel configuration - local $_; - my $parallel = $urpm->open_safe("<", "/etc/urpmi/parallel.cfg"); - if ($parallel) { - while (<$parallel>) { + foreach (cat_("/etc/urpmi/parallel.cfg")) { chomp; s/#.*$//; s/^\s*//; s/\s*$//; /\s*([^:]*):(.*)/ or $urpm->{error}(N("unable to parse \"%s\" in file [%s]", $_, "/etc/urpmi/parallel.cfg")), next; $1 eq $options{parallel} and $parallel_options = ($parallel_options && "\n") . $2; - } - close $parallel; } #- if a configuration option has been found, use it; else fatal error. if ($parallel_options) { -- cgit v1.2.1