-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix py2->3 string issues #675
Fix py2->3 string issues #675
Conversation
foozlevazquez
commented
Feb 21, 2015
- Handle exceptions with binary string content. Added test.
- Handle api_requests with binary content correctly in Python 3. Added test.
See #671 for the full gory history. |
@dhermes Can you help me understand why this is claiming no coverage, when it is being tested by these tests with and without binary strings? I'm hoping understanding that one will help me understand the other coverage failure. Thanks. |
From https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/51608518#L383
It looks like you've got 2 branch misses. The line numbers are given, so hopefully they are easy to find. Typically a branch miss like this means in code like if foo == bar:
baz()
You can see this report by running
|
@@ -171,6 +171,9 @@ def make_exception(response, content, use_json=True): | |||
:rtype: instance of :class:`GCloudError`, or a concrete subclass. | |||
:returns: Exception specific to the error response. | |||
""" | |||
if not hasattr(content, 'keys') and not isinstance(content, str): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It's unclear which of these fixes were needed. There are only two uses of
The auth issue should be fixed upstream in The only change here is one in WDYT? How did you determine these fixes were needed? (FWIW the |
I'm closing this out since it's being fixed upstream in |