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 <cardoe@cardoe.com>
This commit is contained in:
parent
a6d514b24a
commit
43fdf124f8
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user