sonyxperiadev / pygerrit

MIT License
52 stars 51 forks source link

Return a emplty list if the content is invalid #32

Closed peristeri closed 8 years ago

peristeri commented 8 years ago

If the json loads function raises, the return content is invalid, the function should log the error and return an empty list.

dpursehouse commented 8 years ago

Returning an empty list might not always be appropriate. There are some endpoints that return a dict, or a string. Callers of those may not expect the return value to be a list.

It might be better to make it raise an error instead.

dpursehouse commented 8 years ago

Sorry for the delay. I didn't receive any email notification that you'd added a new commit.