Permalink
Browse files

Empty .agner repos shouldn't cause failure listing other packages

  • Loading branch information...
1 parent dce0686 commit 94bf9770ea0a1a58718884d7049374671c55b725 @yrashk yrashk committed Feb 1, 2011
Showing with 12 additions and 9 deletions.
  1. +12 −9 src/agner_github.erl
View
21 src/agner_github.erl
@@ -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.

0 comments on commit 94bf977

Please sign in to comment.