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()