Skip to content

Commit

Permalink
simplify conditional statement
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Feb 4, 2024
1 parent 0f3a0e4 commit 60b8acb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/api_core/grpc_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def create_channel(
# If `ssl_credentials` is set and `attempt_direct_path` is set to `True`,
# raise ValueError as this is not yet supported.
# See https://github.com/googleapis/python-api-core/issues/590
if ssl_credentials is not None and attempt_direct_path:
if ssl_credentials and attempt_direct_path:
raise ValueError("Using ssl_credentials with Direct Path is not supported")

composite_credentials = _create_composite_credentials(
Expand Down
2 changes: 1 addition & 1 deletion google/api_core/grpc_helpers_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def create_channel(
# If `ssl_credentials` is set and `attempt_direct_path` is set to `True`,
# raise ValueError as this is not yet supported.
# See https://github.com/googleapis/python-api-core/issues/590
if ssl_credentials is not None and attempt_direct_path:
if ssl_credentials and attempt_direct_path:
raise ValueError("Using ssl_credentials with Direct Path is not supported")

composite_credentials = grpc_helpers._create_composite_credentials(
Expand Down

0 comments on commit 60b8acb

Please sign in to comment.