From 497bc99c278306f76c7f2d9997bbda1efc81677b Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 29 Sep 2022 13:18:01 -0700 Subject: [PATCH] agnos updater: set timeout on download (#25927) old-commit-hash: 74f741d0be89c9a03573d47b00d59be964884d5f --- system/hardware/tici/agnos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/hardware/tici/agnos.py b/system/hardware/tici/agnos.py index 51998bf8b7..5f446a8e90 100755 --- a/system/hardware/tici/agnos.py +++ b/system/hardware/tici/agnos.py @@ -20,7 +20,7 @@ class StreamingDecompressor: def __init__(self, url: str) -> None: self.buf = b"" - self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None}) # type: ignore # pylint: disable=missing-timeout + self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None}, timeout=60) # type: ignore self.it = self.req.iter_content(chunk_size=1024 * 1024) self.decompressor = lzma.LZMADecompressor(format=lzma.FORMAT_AUTO) self.eof = False