Add with_scopes method to GCS credentials class
This method was added in a recent release of the GCP api; we need to override it as well since it reinstantiates the class and our constructor is different. Change-Id: I11b372bb9e1933aa5705d00f7393d651be66b3ba
This commit is contained in:
parent
feaf0f2ad5
commit
795db2d4f6
@ -78,6 +78,14 @@ class Credentials(gce_cred.Credentials):
|
||||
self.expiry = (datetime.datetime.utcnow() +
|
||||
datetime.timedelta(seconds=data['expires_in']))
|
||||
|
||||
def with_scopes(self, scopes):
|
||||
return self.__class__(
|
||||
path=self._path,
|
||||
scopes=scopes,
|
||||
service_account_email=self._service_account_email,
|
||||
quota_project_id=self._quota_project_id,
|
||||
)
|
||||
|
||||
|
||||
class Uploader():
|
||||
def __init__(self, client, container, prefix=None,
|
||||
|
Loading…
Reference in New Issue
Block a user