Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reviews: Catch rating detection HTTP errors #16

Merged
merged 1 commit into from
Sep 15, 2016
Merged

Conversation

iakat
Copy link
Collaborator

@iakat iakat commented Sep 15, 2016

No description provided.

try:
if blob.detect_language() == 'en':
return round(min(max(blob.sentiment.polarity, -0.5), 0.5) * 4 + 3)
except urllib.error.HTTPError:
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to import urllib.error

@underyx underyx merged commit c103e00 into master Sep 15, 2016
@underyx underyx deleted the simone-httpexceptions branch November 3, 2016 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants