Skip to content

Commit 7180fd8

Browse files
committed
Move set request timeout from resource to client
Signed-off-by: lsenta <laurent.senta@gmail.com>
1 parent ea9d165 commit 7180fd8

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

hubstorage/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def request(self, is_idempotent=False, **kwargs):
8686
8787
Use the retry policy configured in the client when is_idempotent is True
8888
"""
89+
kwargs.setdefault('timeout', self.connection_timeout)
8990

9091
def invoke_request():
9192
r = self.session.request(**kwargs)

hubstorage/resourcetype.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def __init__(self, client, key, auth=None):
2121
def _iter_lines(self, _path, **kwargs):
2222
kwargs['url'] = urlpathjoin(self.url, _path)
2323
kwargs.setdefault('auth', self.auth)
24-
kwargs.setdefault('timeout', self.client.connection_timeout)
2524
if 'jl' in kwargs:
2625
kwargs['data'] = jlencode(kwargs.pop('jl'))
2726

0 commit comments

Comments
 (0)