Skip to content

Commit

Permalink
use self._credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Mar 19, 2024
1 parent 0ff1350 commit 7f73d01
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions google/cloud/bigtable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _get_scopes(self):

return scopes

def _emulator_channel(self, transport, credentials, options):
def _emulator_channel(self, transport, options):
"""Create a channel using self._credentials
Insecure channels are used for the emulator as secure channels
Expand All @@ -228,7 +228,7 @@ def _emulator_channel(self, transport, credentials, options):

# Default the token to a non-empty string, in this case "owner".
token = "owner"
if credentials is not None and credentials.id_token is not None:
if self._credentials is not None and self._credentials.id_token is not None:
token = self._credentials.id_token
options.append(("Authorization", f"Bearer {token}"))
if "GrpcAsyncIOTransport" in str(transport.__name__):
Expand All @@ -252,7 +252,6 @@ def _create_gapic_client_channel(self, client_class, grpc_transport):
if self._emulator_host is not None:
channel = self._emulator_channel(
transport=grpc_transport,
credentials=self._credentials,
options=_GRPC_CHANNEL_OPTIONS,
)
else:
Expand Down

0 comments on commit 7f73d01

Please sign in to comment.