[ARVADOS] updated: 5fbc413ccdabc9c7551f13e5a76573d72c438251

git at public.curoverse.com git at public.curoverse.com
Wed Mar 4 14:09:29 EST 2015


Summary of changes:
 sdk/python/arvados/api.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

       via  5fbc413ccdabc9c7551f13e5a76573d72c438251 (commit)
      from  068189e8be1e83066ea3c7b79a1dfdb2dcacde54 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5fbc413ccdabc9c7551f13e5a76573d72c438251
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 4 14:13:07 2015 -0500

    4956: Mark monkey patching methods as internal

diff --git a/sdk/python/arvados/api.py b/sdk/python/arvados/api.py
index 6103bab..3968f01 100644
--- a/sdk/python/arvados/api.py
+++ b/sdk/python/arvados/api.py
@@ -14,7 +14,7 @@ import util
 
 _logger = logging.getLogger('arvados.api')
 
-def intercept_http_request(self, uri, **kwargs):
+def _intercept_http_request(self, uri, **kwargs):
     from httplib import BadStatusLine
 
     if (self.max_request_size and
@@ -40,11 +40,11 @@ def intercept_http_request(self, uri, **kwargs):
         # risky.
         return self.orig_http_request(uri, **kwargs)
 
-def patch_http_request(http, api_token):
+def _patch_http_request(http, api_token):
     http.arvados_api_token = api_token
     http.max_request_size = 0
     http.orig_http_request = http.request
-    http.request = types.MethodType(intercept_http_request, http)
+    http.request = types.MethodType(_intercept_http_request, http)
     return http
 
 # Monkey patch discovery._cast() so objects and arrays get serialized
@@ -145,7 +145,7 @@ def api(version=None, cache=True, host=None, token=None, insecure=False, **kwarg
             http_kwargs['disable_ssl_certificate_validation'] = True
         kwargs['http'] = httplib2.Http(**http_kwargs)
 
-    kwargs['http'] = patch_http_request(kwargs['http'], token)
+    kwargs['http'] = _patch_http_request(kwargs['http'], token)
 
     svc = apiclient_discovery.build('arvados', version, **kwargs)
     svc.api_token = token

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list