Skip to content

Commit

Permalink
Update sky/clouds/oci.py
Browse files Browse the repository at this point in the history
Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
  • Loading branch information
yika-luo and Michaelvll authored Oct 25, 2024
1 parent 432f755 commit 79c4fca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sky/clouds/oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ def get_credential_file_mounts(self) -> Dict[str, str]:
sky_cfg_file = oci_utils.oci_config.get_sky_user_config_file()
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 79c4fca

Please sign in to comment.