summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
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 {