File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,9 @@ def __init__(
132132 kwargs ["client_options" ] = {
133133 "api_endpoint" : os .environ .get ("PUBSUB_EMULATOR_HOST" )
134134 }
135- kwargs ["credentials" ] = AnonymousCredentials ()
135+ # Configure credentials directly to transport, if provided.
136+ if not kwargs ["transport" ]:
137+ kwargs ["credentials" ] = AnonymousCredentials ()
136138
137139 # For a transient failure, retry publishing the message infinitely.
138140 self .publisher_options = types .PublisherOptions (* publisher_options )
Original file line number Diff line number Diff line change @@ -85,7 +85,9 @@ def __init__(
8585 kwargs ["client_options" ] = {
8686 "api_endpoint" : os .environ .get ("PUBSUB_EMULATOR_HOST" )
8787 }
88- kwargs ["credentials" ] = AnonymousCredentials ()
88+ # Configure credentials directly to transport, if provided.
89+ if not kwargs ["transport" ]:
90+ kwargs ["credentials" ] = AnonymousCredentials ()
8991
9092 # Instantiate the underlying GAPIC client.
9193 super ().__init__ (** kwargs )
You can’t perform that action at this time.
0 commit comments