summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-04 08:20:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-04 08:20:54 +0000
commit00fb1374416de81ef2c2a770cbc3eea77cf3a247 (patch)
treeb4672c18539efa76d0794495971dabb86937843c /urpm/download.pm
parentda8524bd04312e12936d4b9e15bdd0943cbf81b8 (diff)
downloadurpmi-00fb1374416de81ef2c2a770cbc3eea77cf3a247.tar
urpmi-00fb1374416de81ef2c2a770cbc3eea77cf3a247.tar.gz
urpmi-00fb1374416de81ef2c2a770cbc3eea77cf3a247.tar.bz2
urpmi-00fb1374416de81ef2c2a770cbc3eea77cf3a247.tar.xz
urpmi-00fb1374416de81ef2c2a770cbc3eea77cf3a247.zip
cleanup
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm11
1 files changed, 7 insertions, 4 deletions
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 {