From aaf3c949b654db9a3252f58353bedbc60c17e13b Mon Sep 17 00:00:00 2001 From: cordt-sei <165932662+cordt-sei@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:23:35 -0600 Subject: [PATCH] Update urlcheck.py Improve json output --- scripts/urlcheck.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/urlcheck.py b/scripts/urlcheck.py index 9676c51..ab354f2 100644 --- a/scripts/urlcheck.py +++ b/scripts/urlcheck.py @@ -78,10 +78,11 @@ def generate_report(report): "total_issues": len(report), "issues": report } - print(json.dumps(output)) + return json.dumps(output) if __name__ == "__main__": check_path = os.environ.get('CHECK_PATH', './pages/') print(f"Checking URLs in location: {check_path}") report = check_location(check_path) - generate_report(report) + output = generate_report(report) + print(output)