From 449c47f4fa15e245eaa0828fc18a00d4ba2824ed Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Fri, 5 Jan 2024 20:49:19 -0500 Subject: [PATCH] printf debugging.... --- validate_json.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/validate_json.py b/validate_json.py index b9000d2..f967a30 100644 --- a/validate_json.py +++ b/validate_json.py @@ -1,6 +1,9 @@ import os import sys import requests +import base64 +import json + token = sys.argv[1] @@ -36,15 +39,11 @@ def getfile(url): sys.exit(-1) try: tag = releaseData['tag_name'] - print("Tag: ") - print(tag) pluginjsonurl = f"{projectUrl}/contents/plugin.json?ref={tag}" - print("url: ") - print(pluginjsonurl) - content = getfile(pluginjson).json()['content'] - print("content: ") + content = getfile(pluginjsonurl).json()['content'] print(content) - # Still need to base64 decode the content and json decode that... + jsoncontent = json.loads(base64.b64decode(content)) + print(jsoncontent) except: print(f"\n\nFailed to parse valid plugin.json from https://github.com/{repo}/blob/master/plugin.json") sys.exit(-1)