[ARVADOS] updated: 7e931b4355800f1715b614e7a01212a1b1791a30

Git user git at public.curoverse.com
Thu Dec 15 14:47:42 EST 2016


Summary of changes:
 sdk/python/arvados/keep.py        | 4 ++--
 services/fuse/tests/test_retry.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

       via  7e931b4355800f1715b614e7a01212a1b1791a30 (commit)
      from  386248b68c309b890f9cb257360a62d28cb8706b (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 7e931b4355800f1715b614e7a01212a1b1791a30
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Dec 15 14:36:56 2016 -0500

    Tidy up queue usage. No issue #

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index c989479..38f332b 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -296,14 +296,14 @@ class KeepClient(object):
 
         def _get_user_agent(self):
             try:
-                return self._user_agent_pool.get(False)
+                return self._user_agent_pool.get(block=False)
             except Queue.Empty:
                 return pycurl.Curl()
 
         def _put_user_agent(self, ua):
             try:
                 ua.reset()
-                self._user_agent_pool.put(ua, False)
+                self._user_agent_pool.put(ua, block=False)
             except:
                 ua.close()
 
diff --git a/services/fuse/tests/test_retry.py b/services/fuse/tests/test_retry.py
index b46ba78..81d5c86 100644
--- a/services/fuse/tests/test_retry.py
+++ b/services/fuse/tests/test_retry.py
@@ -50,7 +50,7 @@ class RetryPUT(IntegrationTest):
         q.put(mockedCurl)
         q.put(pycurl.Curl())
         q.put(pycurl.Curl())
-        with mock.patch('arvados.keep.KeepClient.KeepService._get_user_agent', side_effect=lambda: q.get(block=None)):
+        with mock.patch('arvados.keep.KeepClient.KeepService._get_user_agent', side_effect=q.get_nowait):
             self.pool_test(os.path.join(self.mnt, 'zzz'))
             self.assertTrue(mockedCurl.perform.called)
     @staticmethod

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list