Skip to content

Commit

Permalink
Fix PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
shadchin committed Dec 17, 2015
1 parent 0a1f906 commit e93b833
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Portroach/SiteHandler/PyPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ sub GetFiles
$ua->agent(USER_AGENT);
$resp = $ua->request(HTTP::Request->new(GET => $query));
if ($resp->is_success) {
my ($json, $info, $version);
my ($json, $urls);

$json = decode_json($resp->decoded_content);
$info = $json->{info};
$version = $info->{version};
next unless $version;

push(@$files, $json->{releases}{$version}[0]{filename});
$urls = $json->{urls};
foreach my $url (@$urls) {
push(@$files, $url->{filename});
}
} else {
_debug("GET failed: " . $resp->code);
return 0;
Expand Down

0 comments on commit e93b833

Please sign in to comment.