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

Add a couple of features #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add a couple of features #4

wants to merge 2 commits into from

Conversation

samv
Copy link

@samv samv commented Aug 27, 2013

Hey there, I worked on a standup bot, and I needed these two changes for it to work correctly. More detailed descriptions are on individual commits. Cheers and thanks for writing this module!

samv added 2 commits August 27, 2013 15:27
If the remote raises an error like 400 Bad Request, the error is
generally lost, and all you see is "HTTPError()".  Interpret the error
document in the response and raise a better exception in lieu of more
formal exception decoding.
A couple of API functions were missed; add hooks to create binding
functions.
try:
res = urlopen(req)
except HTTPError, e:
resp = "".join(e.readlines())
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason not to use resp = e.read() ?

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.

2 participants