Skip to content

Commit

Permalink
Change ImportError to Exception to capture all kinds of exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
shunping committed Jun 8, 2024
1 parent 9788a48 commit 366ee11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdks/python/apache_beam/options/pipeline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,9 @@ def _warn_if_soft_delete_policy_enabled(self, arg_name):
_LOGGER.warning(
'Unable to check soft delete policy in the bucket of %s.' %
gcs_path)
except ImportError:
_LOGGER.warning('Missing dependencies to check soft delete policy.')
except Exception:
_LOGGER.warning(
'Unexpected error occurred when checking soft delete policy.')
return False

# If either temp or staging location has an issue, we use the valid one for
Expand Down

0 comments on commit 366ee11

Please sign in to comment.