fix: add back python 2.7 for gcloud usage only (#892)
* fix: add back python 2.7 for gcloud
* fix: fix setup and tests
* fix: add enum34 for python 2.7
* fix: add app engine app and fix noxfile
* fix: move test_app_engine.py
* fix: fix downscoped
* fix: fix downscoped
* fix: remove py2 from classifiers
diff --git a/google/oauth2/sts.py b/google/oauth2/sts.py
index 9f2d68a..ae3c014 100644
--- a/google/oauth2/sts.py
+++ b/google/oauth2/sts.py
@@ -31,9 +31,10 @@
.. _rfc8693 section 2.2.1: https://tools.ietf.org/html/rfc8693#section-2.2.1
"""
-import http.client
import json
-import urllib
+
+from six.moves import http_client
+from six.moves import urllib
from google.oauth2 import utils
@@ -145,7 +146,7 @@
)
# If non-200 response received, translate to OAuthError exception.
- if response.status != http.client.OK:
+ if response.status != http_client.OK:
utils.handle_error_response(response_body)
response_data = json.loads(response_body)