Skip to content

Commit

Permalink
Make xmlrpc timeout configurable (#223)
Browse files Browse the repository at this point in the history
The default timeout can be changed by environment variable.
  • Loading branch information
emilyzheng authored Aug 29, 2023
1 parent 8a704d5 commit efc22d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kobo/xmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class CookieTransport(xmlrpclib.Transport):

def __init__(self, *args, **kwargs):
cookiejar = kwargs.pop("cookiejar", None)
self.timeout = kwargs.pop("timeout", 0)
self.timeout = kwargs.pop("timeout", int(os.environ.get("KOBO_XMLRPC_TIMEOUT", "0")))
self.proxy_config = self._get_proxy(**kwargs)
self.no_proxy = os.environ.get("no_proxy", "").lower().split(',')
self.context = kwargs.pop('context', None)
Expand Down

0 comments on commit efc22d7

Please sign in to comment.