Skip to content

Commit 3db578c

Browse files
committed
corrected get_debug_page
1 parent a94250a commit 3db578c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/client/get_debug_page.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@
9292

9393
bd = Client(base_url=args.base_url, token=access_token, verify=args.verify)
9494

95-
url = "https://ec2-44-202-86-163.compute-1.amazonaws.com/debug?job=true"
95+
if args.base_url.endswith("/"):
96+
base_url = args.base_url[:-1]
97+
else:
98+
base_url = args.base_url
99+
100+
url = f"{base_url}/debug?job=true"
96101

97102
result = bd.session.get(url)
98103

@@ -101,7 +106,7 @@
101106

102107
else:
103108
timestamp = datetime.now().isoformat()
104-
filename = f"{args.output_file}-{timestamp}.txt"
109+
filename = f"{args.output_file}-{timestamp}.txt".replace(":","-")
105110
f = open(filename,"w")
106111
f.write(result.text)
107112
f.close()

0 commit comments

Comments
 (0)