Skip to content

Commit

Permalink
printf debugging....
Browse files Browse the repository at this point in the history
  • Loading branch information
psifertex committed Jan 6, 2024
1 parent 37fef60 commit 449c47f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions validate_json.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
import sys
import requests
import base64
import json


token = sys.argv[1]

Expand Down Expand Up @@ -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)

0 comments on commit 449c47f

Please sign in to comment.