Skip to content

Commit

Permalink
Empty .agner repos shouldn't cause failure listing other packages
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 1, 2011
1 parent dce0686 commit 94bf977
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/agner_github.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ repositories(Page) ->
[] ->
[];
Repositories ->
Repos = lists:filter(fun ({invalid,_}) ->
false;
(_) ->
true
end,
lists:map(fun ({struct, RepObject}) ->
{repo_name(proplists:get_value(<<"name">>, RepObject)),
proplists:get_value(<<"pushed_at">>, RepObject)}
end, Repositories)),
Repos = lists:filter(fun
({_,undefined}) ->
false;
({invalid,_}) ->
false;
(_) ->
true
end,
lists:map(fun ({struct, RepObject}) ->
{repo_name(proplists:get_value(<<"name">>, RepObject)),
proplists:get_value(<<"pushed_at">>, RepObject)}
end, Repositories)),
Repos ++ repositories(Page + 1)
end
end.
Expand Down

0 comments on commit 94bf977

Please sign in to comment.