Commit 8f381f2c by fwkz

Adding timeout to utils.http_request()

parent 7e5438a2
......@@ -377,6 +377,7 @@ def random_text(length, alph=string.ascii_letters+string.digits):
def http_request(method, url, **kwargs):
""" Wrapper for 'requests' silencing exceptions a little bit. """
kwargs.setdefault('timeout', 30.0)
kwargs.setdefault('verify', False)
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment