-
Notifications
You must be signed in to change notification settings - Fork 17
default httpc timeout if unset #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## main #94 +/- ##
==========================================
+ Coverage 77.71% 77.72% +0.01%
==========================================
Files 41 41
Lines 4316 4318 +2
Branches 835 836 +1
==========================================
+ Hits 3354 3356 +2
Misses 701 701
Partials 261 261
Continue to review full report at Codecov.
|
25f836f
to
f3febc6
Compare
@@ -254,6 +255,8 @@ def __init__( | |||
self.httpc = requests.request | |||
|
|||
self.httpc_params = httpc_params or {} | |||
if not self.httpc_params.get("timeout"): | |||
self.httpc_params["timeout"] = DEFAULT_HTTPC_TIMEOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead or copy the same code all around probably it would be better to create a default httpc loader and use it in all the classes
f3febc6
to
6d449b8
Compare
6d449b8
to
d1abf29
Compare
- fixes #93
d1abf29
to
e3a6c43
Compare
@@ -774,7 +774,7 @@ def test_localhost_url(): | |||
|
|||
kb = issuer.find(url) | |||
assert len(kb) == 1 | |||
assert kb[0].httpc_params == {"verify": False} | |||
assert kb[0].httpc_params == {"timeout": 10, "verify": False} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops... That would be instead DEFAULT_HTTPC_TIMEOUT ...
fixes #93