agnos updater: set timeout on download (#25927)

pull/25868/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent badecfd060
commit 74f741d0be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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

Loading…
Cancel
Save