Skip to content

Commit

Permalink
Add timeout to requests calls (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed Nov 9, 2018
1 parent 358181f commit 2a773e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mwclient/client.py
Expand Up @@ -63,6 +63,8 @@ def __init__(self, host, path='/w/', ext='.php', pool=None, retry_timeout=30,
self.max_lag = text_type(max_lag)
self.force_login = force_login
self.requests = reqs or {}
if 'timeout' not in self.requests:
self.requests['timeout'] = 30 # seconds

if consumer_token is not None:
auth = OAuth1(consumer_token, consumer_secret, access_token, access_secret)
Expand Down

0 comments on commit 2a773e1

Please sign in to comment.