Skip to content

Commit

Permalink
Use google-auth-httplib2 explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
tushuhei committed Dec 19, 2017
1 parent 11a8432 commit 774b64c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions budou/budou.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from . import api, cachefactory
import collections
import google.auth
import google_auth_httplib2
from googleapiclient import discovery
from xml.etree import ElementTree as ET
import html5lib
Expand Down Expand Up @@ -187,8 +188,8 @@ def authenticate(cls, json_path=None):
authenticate with default credentials.''')
else:
scoped_credentials, project = google.auth.default(scope)
service = discovery.build(
'language', 'v1beta2', credentials=scoped_credentials)
authed_http = google_auth_httplib2.AuthorizedHttp(scoped_credentials)
service = discovery.build('language', 'v1beta2', http=authed_http)
return cls(service)

def parse(self, source, attributes=None, use_cache=True, language=None,
Expand Down

0 comments on commit 774b64c

Please sign in to comment.