We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af3a21b commit c0052e6Copy full SHA for c0052e6
google/api_core/grpc_helpers.py
@@ -411,11 +411,11 @@ def _modify_target_for_direct_path(target: str) -> str:
411
# the Direct Path prefix `google-c2p:///` will be used instead.
412
target = target.replace(dns_prefix, "")
413
414
- direct_path_prefix = ":///"
415
- if direct_path_prefix not in target:
+ direct_path_separator = ":///"
+ if direct_path_separator not in target:
416
target_without_port = target.split(":")[0]
417
# Modify the target to use Direct Path by adding the `google-c2p:///` prefix
418
- target = f"google-c2p{direct_path_prefix}{target_without_port}"
+ target = f"google-c2p{direct_path_separator}{target_without_port}"
419
return target
420
421
0 commit comments