Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't bother writing projects file if not 200 response
  • Loading branch information
jonathanstowe committed Jun 14, 2015
1 parent e3628e0 commit 7d88f35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Panda/Ecosystem.pm
Expand Up @@ -81,6 +81,13 @@ class Panda::Ecosystem {
$s.send("GET /projects.json HTTP/1.0\r\nHost: ecosystem-api.p6c.org\r\n\r\n");
}
my ($buf, $g) = '';

my $http-header = $s.get;

if $http-header !~~ /'HTTP/1.1 200 OK'/ {
die "can't download projects file $http-header";
}

$buf ~= $g while $g = $s.get;

if %*ENV<http_proxy> {
Expand Down

0 comments on commit 7d88f35

Please sign in to comment.