Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
shunping committed Jun 10, 2024
1 parent 82dcb13 commit 3e2623f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion sdks/python/apache_beam/io/gcp/gcsio.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from typing import Optional
from typing import Union

from google.api_core.exceptions import GoogleAPICallError
from google.cloud import storage
from google.cloud.exceptions import NotFound
from google.cloud.storage.fileio import BlobReader
Expand Down
4 changes: 1 addition & 3 deletions sdks/python/apache_beam/options/pipeline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,13 +915,11 @@ def _create_default_gcs_bucket(self):

# Log warning if soft delete policy is enabled in a gcs bucket
# that is specified in an argument.
# The function returns true only if the policy is enabled.
# If the policy is disabled or there is any exception
def _warn_if_soft_delete_policy_enabled(self, arg_name):
gcs_path = getattr(self, arg_name, None)
try:
from apache_beam.io.gcp import gcsio
if gcsio.GcsIO.is_soft_delete_enabled(gcs_path):
if gcsio.GcsIO().is_soft_delete_enabled(gcs_path):
_LOGGER.warning(
"Bucket specified in %s has soft-delete policy enabled."
" To avoid being billed for unnecessary storage costs, turn"
Expand Down

0 comments on commit 3e2623f

Please sign in to comment.