Use pprint for better formatting of user repositories output in debug_request function
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
import traceback
|
import traceback
|
||||||
|
import pprint
|
||||||
|
|
||||||
# --- Configuration ---
|
# --- Configuration ---
|
||||||
GITEA_URL = "https://gitea.nathan-falvey.synology.me"
|
GITEA_URL = "https://gitea.nathan-falvey.synology.me"
|
||||||
@@ -27,7 +28,7 @@ def debug_request():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
print(do_request(f"{GITEA_URL}/api/v1/version", headers=headers))
|
print(do_request(f"{GITEA_URL}/api/v1/version", headers=headers))
|
||||||
print(do_request(f"{GITEA_URL}/api/v1/user/repos?type=owner", headers=headers))
|
pprint.pprint(do_request(f"{GITEA_URL}/api/v1/user/repos?type=owner", headers=headers))
|
||||||
except Exception:
|
except Exception:
|
||||||
print("\n" + "!"*30)
|
print("\n" + "!"*30)
|
||||||
print("STACK TRACE (Line Numbers):")
|
print("STACK TRACE (Line Numbers):")
|
||||||
|
|||||||
Reference in New Issue
Block a user