diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:27:33 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:27:33 +0000 |
commit | c87e8657e04e0f4e3d232a3291950b7f08c20cf0 (patch) | |
tree | 2c2788c00b93dca5500f1e637f17aee56cf001f7 | |
parent | a2229d239b26660d3af146abb19daba93846b4da (diff) | |
download | drakx-c87e8657e04e0f4e3d232a3291950b7f08c20cf0.tar drakx-c87e8657e04e0f4e3d232a3291950b7f08c20cf0.tar.gz drakx-c87e8657e04e0f4e3d232a3291950b7f08c20cf0.tar.bz2 drakx-c87e8657e04e0f4e3d232a3291950b7f08c20cf0.tar.xz drakx-c87e8657e04e0f4e3d232a3291950b7f08c20cf0.zip |
(_mirrors_raw_standalone) split it out of mirrors_raw()
-rw-r--r-- | perl-install/mirror.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/perl-install/mirror.pm b/perl-install/mirror.pm index 2df0fd09a..b9ee55ba2 100644 --- a/perl-install/mirror.pm +++ b/perl-install/mirror.pm @@ -66,6 +66,18 @@ sub _mirrors_raw_install { @lines; } +sub _mirrors_raw_standalone { + my ($list) = @_; + my @lines; + if (ref($downloader)) { + @lines = $downloader->($list); + @lines or die "mirror list not found"; + } else { + die "Missing download callback"; + } + @lines; +} + sub mirrors_raw { my ($product_id) = @_; @@ -79,12 +91,7 @@ sub mirrors_raw { if ($::isInstall) { @lines = _mirrors_raw_install($list); } else { - if (ref($downloader)) { - @lines = $downloader->($list); - @lines or die "mirror list not found"; - } else { - die "Missing download callback"; - } + @lines = _mirrors_raw_standalone($list); } map { common::parse_LDAP_namespace_structure(chomp_($_)) } @lines; } |