Skip to content

Commit

Permalink
fix no project in config context error
Browse files Browse the repository at this point in the history
  • Loading branch information
JungleCatSW committed Apr 10, 2024
1 parent 1793d18 commit b8a0fb5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion helpers/cudo_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_project_id():
if 'project' in context_config:
return context_config['project'], None
else:
return None, Exception("No project set in configuration")
return None, Exception('No project set in configuration (cudo.yml)')
else:
return None, error

Expand All @@ -46,6 +46,14 @@ def project_id():
return ''


def project_id_throwable():
p, e = get_project_id()
if e is None:
return p
else:
raise e


# APIs
def api_keys():
c, err = client()
Expand Down

0 comments on commit b8a0fb5

Please sign in to comment.