From 00fb1374416de81ef2c2a770cbc3eea77cf3a247 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Sep 2008 08:20:54 +0000 Subject: cleanup --- urpm/download.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'urpm') diff --git a/urpm/download.pm b/urpm/download.pm index 1ce3960e..1cc8f965 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -180,9 +180,12 @@ sub set_proxy_config { #- returns an array of command-line arguments for wget or curl. sub set_proxy { my ($proxy) = @_; - my @res; + my $p = $proxy->{proxy}; - if (defined $p->{http_proxy} || defined $p->{ftp_proxy}) { + defined $p->{http_proxy} || defined $p->{ftp_proxy} or return; + + my @res; + for ($proxy->{type}) { if (/\bwget\b/) { if (defined $p->{http_proxy}) { @@ -209,8 +212,8 @@ sub set_proxy { die N("Unknown webfetch `%s' !!!\n", $proxy->{type}); } } - } - return @res; + + @res; } sub _error { -- cgit v1.2.1