From cd3137039bda4ce0a5650bd637136b3898b79192 Mon Sep 17 00:00:00 2001 From: Andrew Aikawa Date: Thu, 19 Dec 2024 22:22:16 +0000 Subject: [PATCH] use logger.debug --- sky/provision/do/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sky/provision/do/utils.py b/sky/provision/do/utils.py index c489fef670f..2f70486ddc5 100644 --- a/sky/provision/do/utils.py +++ b/sky/provision/do/utils.py @@ -55,11 +55,12 @@ def _init_client(): CREDENTIALS_PATH = path credentials_found += 1 logger.debug(f'Digital Ocean credential path found at {path}') - assert credentials_found == 1, 'more than 1 credential file found' + if not credentials_found > 1: + logger.error('more than 1 credential file found') if CREDENTIALS_PATH is None: - raise DigitalOceanError( + logger.error(DigitalOceanError( 'no credentials file found from ' - f'the following paths {POSSIBLE_CREDENTIALS_PATHS}') + f'the following paths {POSSIBLE_CREDENTIALS_PATHS}')) # attempt default context credentials = common_utils.read_yaml(CREDENTIALS_PATH)