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): ...@@ -377,6 +377,7 @@ def random_text(length, alph=string.ascii_letters+string.digits):
def http_request(method, url, **kwargs): def http_request(method, url, **kwargs):
""" Wrapper for 'requests' silencing exceptions a little bit. """ """ Wrapper for 'requests' silencing exceptions a little bit. """
kwargs.setdefault('timeout', 30.0)
kwargs.setdefault('verify', False) kwargs.setdefault('verify', False)
try: 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