Skip to content

Commit a4b28df

Browse files
committed
Explicitly using API_BASE_URL from current connection in datastore.
This can be seen as a bug-fix where a sub-class may not be able to impact the URIs generated. In addition, we added the (repeated) value of the base connection's API_BASE_URL in advance of swapping it out for v1beta3.
1 parent 36b08c1 commit a4b28df

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

gcloud/datastore/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class Connection(connection.Connection):
3939
from :mod:`gcloud.connection`.
4040
"""
4141

42+
API_BASE_URL = 'https://www.googleapis.com'
43+
"""The base of the API call URL."""
44+
4245
API_VERSION = 'v1beta2'
4346
"""The version of the API, used in building the API call's URL."""
4447

@@ -54,7 +57,7 @@ def __init__(self, credentials=None, http=None, api_base_url=None):
5457
super(Connection, self).__init__(credentials=credentials, http=http)
5558
if api_base_url is None:
5659
api_base_url = os.getenv(GCD_HOST,
57-
connection.API_BASE_URL)
60+
self.__class__.API_BASE_URL)
5861
self.api_base_url = api_base_url
5962

6063
def _request(self, dataset_id, method, data):

0 commit comments

Comments
 (0)