Skip to content

Commit eda5880

Browse files
authored
Decode service to utf-8. (googleapis#723)
1 parent 0ba1ca4 commit eda5880

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

googleapiclient/discovery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def build_from_document(
333333

334334
if isinstance(service, six.string_types):
335335
service = json.loads(service)
336+
elif isinstance(service, six.binary_type):
337+
service = json.loads(service.decode('utf-8'))
336338

337339
if 'rootUrl' not in service and (isinstance(http, (HttpMock,
338340
HttpMockSequence))):

0 commit comments

Comments
 (0)