17989: Passes the given timeout value to api_from_config()
[arvados.git] / sdk / python / arvados / api.py
index 315fc74a713f42fbee7b7b030c36576ed5426bc0..55b1e22b78a9add1588d46f24047d5a9a8aa7c1c 100644 (file)
@@ -157,7 +157,7 @@ def http_cache(data_type):
     return cache.SafeHTTPCache(path, max_age=60*60*24*2)
 
 def api(version=None, cache=True, host=None, token=None, insecure=False,
-        request_id=None, timeout=5*60, **kwargs):
+        request_id=None, timeout=10, **kwargs):
     """Return an apiclient Resources object for an Arvados instance.
 
     :version:
@@ -211,7 +211,8 @@ def api(version=None, cache=True, host=None, token=None, insecure=False,
         pass
     elif not host and not token:
         return api_from_config(
-            version=version, cache=cache, request_id=request_id, **kwargs)
+            version=version, cache=cache, timeout=timeout,
+            request_id=request_id, **kwargs)
     else:
         # Caller provided one but not the other
         if not host: