Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If a URL download fails it will now stop the script with an error, in…

…stead of silently continuing. Also ignoring some files.
  • Loading branch information...
commit 09952ae674a119b5ffdfabec42497bcb4065726a 1 parent b023c0f
Elliot Chance authored
Showing with 5 additions and 0 deletions.
  1. +2 −0  .gitignore
  2. +3 −0  src/functions.pl
View
2  .gitignore
@@ -4,3 +4,5 @@ cloc.pl
sloc.sh
mbdump*
replication/*
+settings.pl
+src/firstboot.pl
View
3  src/functions.pl
@@ -104,6 +104,9 @@ sub mbz_download_file {
my $ua = LWP::UserAgent->new();
my $request = HTTP::Request->new('GET', $_[0]);
my $resp = $ua->request($request, $_[1]);
+
+ die("Request to download \"$_[0]\" failed. Quitting.\n") if(!$resp->is_success);
+
return $resp;
}
Please sign in to comment.
Something went wrong with that request. Please try again.