summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-10-31 16:11:30 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-10-31 16:11:30 +0100
commit70b6f126f20c8fc9a12bbb64bfae310e55d57a68 (patch)
treef7d31103b62ca2c63788d2194b07fd1747aa802b
parentd11323cf349815197d824facf79b6fdbfc9f5a98 (diff)
parentfbe1743e5e24fdf26c91a9a8b77ca9ad082c5689 (diff)
Merge pull request #945 from SaberUK/insp20+even-more-module-manager-fixes
Fix modulemanager not being able to download modules (again!).
-rwxr-xr-xmodulemanager11
1 files changed, 8 insertions, 3 deletions
diff --git a/modulemanager b/modulemanager
index 24f4467a4..af5bf113c 100755
--- a/modulemanager
+++ b/modulemanager
@@ -348,11 +348,16 @@ for my $mod (sort keys %todo) {
}
$mod_versions{$mod} = $ver;
- my $stat = getstore($url, "src/modules/$mod.cpp");
- if ($stat == 200) {
+ my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });
+ my $response = $ua->get($url);
+
+ if ($response->is_success) {
+ open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
+ print MF $response->decoded_content;
+ close(MF);
print " - done\n";
} else {
- print " - HTTP $stat\n";
+ printf "\nHTTP %s: %s\n", $response->code, $response->message;
}
}