Skip to content

Commit

Permalink
Checking for errors in mailman-api before using results
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
  • Loading branch information
seocam committed Oct 1, 2015
1 parent 31c7cbe commit eee9989
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion colab/accounts/utils/mailman.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ def list_users(listname):
except requests.exceptions.RequestException:
return []

return users.json()
result = users.json()
if isinstance(result, int):
LOGGER.error('Error number %s', result)
return []

return result


def get_user_mailinglists(user):
Expand Down

0 comments on commit eee9989

Please sign in to comment.