Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Sometime querying anitya fails, we should be able to cope with this #205

Merged
merged 2 commits into from Jun 27, 2015

Conversation

pypingou
Copy link
Member

In those case, we cannot retrieve any JSON information, so we show an
error to the user and do not fail

In those case, we cannot retrieve any JSON information, so we show an
error to the user and do not fail
try:
req = requests.get(url)
if req.status_code != 200:
flask.flash(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be cleaner if you raised an exception (which would then be caught around line 357)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do indeed :)

@ralphbean
Copy link
Contributor

👍 to the concept with one non-blocking question about style.

pypingou added a commit that referenced this pull request Jun 27, 2015
Sometime querying anitya fails, we should be able to cope with this
@pypingou pypingou merged commit 9d0db80 into master Jun 27, 2015
@pypingou pypingou deleted the fix_anitya branch June 27, 2015 07:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants