From 43fdf124f87d1d94882bea6dc47bca5605172a7f Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 8 Nov 2024 22:33:11 -0500 Subject: [PATCH] ensure all requests calls have a timeout requests can hang indefinitely without a timeout so ensure all calls have a timeout. Change-Id: I546880a3ebd9319b9d9977a87fbc5e0495ca8091 Signed-off-by: Doug Goldstein --- tools/generate-enum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate-enum.py b/tools/generate-enum.py index 96533f34..51ea6182 100755 --- a/tools/generate-enum.py +++ b/tools/generate-enum.py @@ -34,7 +34,7 @@ def main(): args = parser.parse_args() if args.url.startswith("https://") or args.url.startswith("http://"): - resp = requests.get(args.url) + resp = requests.get(args.url, timeout=30) resp.raise_for_status() content = resp.json() else: