Skip to content

Commit

Permalink
edit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yika-luo committed Oct 25, 2024
1 parent 79c4fca commit 78014c7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sky/clouds/oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,10 @@ def get_credential_file_mounts(self) -> Dict[str, str]:
api_key_file = oci_cfg[
'key_file'] if 'key_file' in oci_cfg else 'BadConf'
sky_cfg_file = oci_utils.oci_config.get_sky_user_config_file()
# Must catch ImportError before any oci_adaptor.oci.exceptions
# because oci_adaptor.oci.exceptions can throw ImportError.
except ImportError:
return {}
# This exception is explicitly separated from the line above, as this function
# can be called by `check.get_credential_file_mounts` even without oci
# dependencies installed. Having this exception in the same line as
# ImportError above can cause another error being raised, due to
# oci_adaptor.oci.exceptions.ConfigFileNotFound trying to import the oci
# dependencies again.
except oci_adaptor.oci.exceptions.ConfigFileNotFound:
return {}

Expand Down

0 comments on commit 78014c7

Please sign in to comment.