googleapiclient 1.6.4

This commit is contained in:
Jay Lee
2017-10-07 19:37:24 -04:00
parent 6e9c1dc08e
commit ddebd0c974
2 changed files with 12 additions and 2 deletions

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "1.6.3"
__version__ = "1.6.4"
# Set default logging handler to avoid "No handler found" warnings.
import logging

View File

@ -19,11 +19,15 @@ import httplib2
try:
import google.auth
import google.auth.credentials
import google_auth_httplib2
HAS_GOOGLE_AUTH = True
except ImportError: # pragma: NO COVER
HAS_GOOGLE_AUTH = False
try:
import google_auth_httplib2
except ImportError: # pragma: NO COVER
google_auth_httplib2 = None
try:
import oauth2client
import oauth2client.client
@ -88,6 +92,12 @@ def authorized_http(credentials):
if HAS_GOOGLE_AUTH and isinstance(
credentials, google.auth.credentials.Credentials):
if google_auth_httplib2 is None:
raise ValueError(
'Credentials from google.auth specified, but '
'google-api-python-client is unable to use these credentials '
'unless google-auth-httplib2 is installed. Please install '
'google-auth-httplib2.')
return google_auth_httplib2.AuthorizedHttp(credentials,
http=build_http())
else: