From 1793d18ed1fcf3dc9c95b96c4a397c187fd6aa12 Mon Sep 17 00:00:00 2001 From: jungle Date: Wed, 10 Apr 2024 18:04:01 +0100 Subject: [PATCH] fix no project in config context error --- helpers/cudo_api.py | 5 ++++- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/helpers/cudo_api.py b/helpers/cudo_api.py index 9f4ee71..7b105f1 100644 --- a/helpers/cudo_api.py +++ b/helpers/cudo_api.py @@ -31,7 +31,10 @@ def get_api_key(): def get_project_id(): key_config, context_config, error = cudo.AuthConfig.load_config(home + '/.config/cudo/cudo.yml', "") if not error: - return context_config['project'], None + if 'project' in context_config: + return context_config['project'], None + else: + return None, Exception("No project set in configuration") else: return None, error diff --git a/pyproject.toml b/pyproject.toml index 28891ae..930f147 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cudo-compute" -version = "0.1.8" +version = "0.1.9" authors = [ { name = "Cudo Ventures", email = "dev@cudoventures.com" }, ]