From 5e14046002632704d6b577a4038b55c689b74205 Mon Sep 17 00:00:00 2001 From: RerankerGuo <121015044+RerankerGuo@users.noreply.github.com> Date: Wed, 5 Aug 2026 13:50:39 +0800 Subject: [PATCH] fix(cli): bound example archive download time --- src/memos/cli.py | 2 +- tests/test_cli.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/memos/cli.py b/src/memos/cli.py index 2ead5ab29..af96d7cef 100644 --- a/src/memos/cli.py +++ b/src/memos/cli.py @@ -42,7 +42,7 @@ def download_examples(dest: str) -> bool: print(f"📥 Downloading examples from {zip_url}...") try: - response = requests.get(zip_url) + response = requests.get(zip_url, timeout=30) response.raise_for_status() with zipfile.ZipFile(BytesIO(response.content)) as z: diff --git a/tests/test_cli.py b/tests/test_cli.py index a1e423e4f..0095e9749 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -66,7 +66,8 @@ def test_download_examples_success(self, mock_file, mock_makedirs, mock_requests assert result is True mock_requests.assert_called_once_with( - "https://github.com/MemTensor/MemOS/archive/refs/heads/main.zip" + "https://github.com/MemTensor/MemOS/archive/refs/heads/main.zip", + timeout=30, ) mock_response.raise_for_status.assert_called_once()