[ARVADOS] updated: 1.3.0-156-g550242c2d

Git user git at public.curoverse.com
Tue Jan 15 11:57:50 EST 2019


Summary of changes:
 sdk/cwl/arvados_cwl/util.py | 7 +++++--
 sdk/cwl/tests/test_util.py  | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

       via  550242c2d5fb0c26b18350573422d9199fcd1d93 (commit)
      from  f27fcfafc8f913780e59f830587aed447cb9a5ab (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 550242c2d5fb0c26b18350573422d9199fcd1d93
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date:   Tue Jan 15 11:57:45 2019 -0500

    13306: Updating get_current_container to raise when not a 404
    
    Arvados-DCO-1.1-Signed-off-by:  Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_cwl/util.py b/sdk/cwl/arvados_cwl/util.py
index 98a2a89a1..776fc6bc2 100644
--- a/sdk/cwl/arvados_cwl/util.py
+++ b/sdk/cwl/arvados_cwl/util.py
@@ -26,6 +26,9 @@ def get_current_container(api, num_retries=0, logger=None):
         current_container = api.containers().current().execute(num_retries=num_retries)
     except ApiError as e:
         # Status code 404 just means we're not running in a container.
-        if e.resp.status != 404 and logger:
-            logger.info("Getting current container: %s", e)
+        if e.resp.status != 404:
+            if logger:
+                logger.info("Getting current container: %s", e)
+            raise e
+            
     return current_container
diff --git a/sdk/cwl/tests/test_util.py b/sdk/cwl/tests/test_util.py
index d58882271..2200d9951 100644
--- a/sdk/cwl/tests/test_util.py
+++ b/sdk/cwl/tests/test_util.py
@@ -44,4 +44,5 @@ class TestUtil(unittest.TestCase):
         api.containers().current().execute.side_effect = ApiError(httplib2.Response({"status": 300}), bytes(b""))
         logger = mock.MagicMock()
 
-        self.assertRaises(ApiError, get_current_container(api, num_retries=0, logger=logger))
\ No newline at end of file
+        with self.assertRaises(ApiError):
+            get_current_container(api, num_retries=0, logger=logger)
\ No newline at end of file

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list