From 20e56a755e9553ccc33a9a97584ad750cf278bfc Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 3 Apr 2021 20:46:34 +0200 Subject: [PATCH] Fix key error when missing the cache --- bin/app-json.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/app-json.py b/bin/app-json.py index f361de6d..09d9c8eb 100755 --- a/bin/app-json.py +++ b/bin/app-json.py @@ -168,7 +168,11 @@ def get_app_versions(app_path, cached_apps_json): initial_branch = _run_cmd("git rev-parse --abbrev-ref HEAD") app_name = basename(app_path) - existing_tags = cached_apps_json[app_name]["versions"].keys() + + try: + existing_tags = cached_apps_json[app_name]["versions"].keys() + except KeyError: + existing_tags = [] for tag in tags: if tag in existing_tags: