set request timeout default to 120 seconds

This commit is contained in:
debugtalk
2017-11-16 10:49:35 +08:00
parent 57dce65d2d
commit c160f390a8

View File

@@ -114,6 +114,8 @@ class HttpSession(requests.Session):
kwargs["auth"] = HttpNtlmAuth(
auth_account["username"], auth_account["password"])
kwargs.setdefault("timeout", 120)
response = self._send_request_safe_mode(method, url, **kwargs)
request_meta["url"] = (response.history and response.history[0] or response)\
.request.path_url