A mysterious `assert(r.ok)` appears after running the script causing me
to read source code. I don't want to read source code every time the
script fails. ;-)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
repo=repo)
r = requests.get(url,
headers={'Authorization': 'token %s' % token})
-assert(r.ok)
+if not r.ok:
+ print("Failed to access github api")
+ print("(Do you have a valid, unexpired github api token?)")
+ sys.exit(1)
+
j = json.loads(r.text or r.content)
print("--- found %d issues tagged with %s" % (len(j), label))