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 requests
|
||||
import traceback
|
||||
import pprint
|
||||
|
||||
# --- Configuration ---
|
||||
GITEA_URL = "https://gitea.nathan-falvey.synology.me"
|
||||
@@ -27,7 +28,7 @@ def debug_request():
|
||||
|
||||
try:
|
||||
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:
|
||||
print("\n" + "!"*30)
|
||||
print("STACK TRACE (Line Numbers):")
|
||||
|
||||
Reference in New Issue
Block a user