From c0ffb71156741b616d337cd1c79c63f0998b9c75 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Thu, 22 Aug 2024 15:45:22 -0700 Subject: [PATCH] setting default timeout --- gnpsdata/publicdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnpsdata/publicdata.py b/gnpsdata/publicdata.py index fa2e2e9..20ae4cd 100644 --- a/gnpsdata/publicdata.py +++ b/gnpsdata/publicdata.py @@ -40,11 +40,11 @@ def get_massive_private_dataset_filelist(accession, username, password): return files_list -def get_massive_public_dataset_filelist(accession): +def get_massive_public_dataset_filelist(accession, timeout=60): url = "https://massive.ucsd.edu/ProteoSAFe/dataset_files.jsp?accession={}".format(accession) # Get Data - r = requests.get(url) + r = requests.get(url, timeout=timeout) if r.status_code != 200: print(r.text)