From 18e22b24eae5d7565bd37a7000f993564361f768 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sun, 2 May 2021 22:10:58 +0200 Subject: [PATCH] Don't explode if missing the README --- bin/app-json.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/app-json.py b/bin/app-json.py index f4e1964..0f62e4f 100755 --- a/bin/app-json.py +++ b/bin/app-json.py @@ -164,9 +164,13 @@ def get_app_metadata(app_path): chdir(app_path) - with open(f"{app_path}/README.md", "r") as handle: - log.info(f"{app_path}/README.md") - contents = handle.read() + try: + with open(f"{app_path}/README.md", "r") as handle: + log.info(f"{app_path}/README.md") + contents = handle.read() + except Exception: + log.info(f"No {app_path}/README.md discovered, moving on") + return {} try: for match in findall(r"\*\*.*\s\*", contents):