Skip to content

Commit 54e3495

Browse files
committed
feat: Add timeout to urlopen() calls
1 parent c9f4229 commit 54e3495

File tree

1 file changed

+1
-1
lines changed
  • src/datapilot/core/knowledge

1 file changed

+1
-1
lines changed

src/datapilot/core/knowledge/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def handle_knowledge_base(self, public_id):
6767
req = Request(url, headers=headers)
6868

6969
try:
70-
with urlopen(req) as response:
70+
with urlopen(req, timeout=30) as response:
7171
data = response.read()
7272
self.send_response(200)
7373
self.send_header("Content-Type", "application/json")

0 commit comments

Comments
 (0)