diff --git a/helpers/cudo_api.py b/helpers/cudo_api.py index 7b105f1..8eca7f5 100644 --- a/helpers/cudo_api.py +++ b/helpers/cudo_api.py @@ -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 @@ -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()