Skip to content

Commit

Permalink
use logger.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
asaiacai committed Dec 19, 2024
1 parent 97f8c4e commit cd31370
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sky/provision/do/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cd31370

Please sign in to comment.